You are viewing a single comment's thread. Return to all comments →
Solution for ORACLE:
select city,len_city from ( select city,LENGTH(CITY) as len_city -- rank based on length of city column ascending order ,dense_rank() over(order by LENGTH(CITY)) as min_city -- rank based on length of city column descending order ,dense_rank() over(order by LENGTH(CITY) desc) as max_cit -- rank based on alphabetical order of city within subgroup of city length ,dense_rank() over(partition by LENGTH(CITY) order by city) as city_sort from STATION ) where (min_city = 1 OR max_city = 1) AND city_sort=1;
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 →
Solution for ORACLE: