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.
with a as (
select city, len (city) ln,
row_number () over (partition by len(city) order by city ) rnk
from station
where
len(city) = (select max(len(city)) from station)
or len(city) = (select min(len(city)) from station))
select city, ln from a
where rnk = 1
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 →
with a as ( select city, len (city) ln, row_number () over (partition by len(city) order by city ) rnk from station where len(city) = (select max(len(city)) from station)
or len(city) = (select min(len(city)) from station)) select city, ln from a where rnk = 1