We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
select Top 1 city,len(city) as f from station ORDER BY f ASC , city ASC;
select Top 1 city,len(city) as f from station ORDER BY f desc, city DESC;
In DB2
Select city,length(city) as name from station ORDER BY name, city asc fetch first 1 row only;
Select city,length(city) as name from station ORDER BY name desc,city desc fetch first 1 row only;
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Weather Observation Station 5
You are viewing a single comment's thread. Return to all comments →
In MS SQL Server
select Top 1 city,len(city) as f from station ORDER BY f ASC , city ASC; select Top 1 city,len(city) as f from station ORDER BY f desc, city DESC;
In DB2
Select city,length(city) as name from station ORDER BY name, city asc fetch first 1 row only; Select city,length(city) as name from station ORDER BY name desc,city desc fetch first 1 row only;