Weather Observation Station 5

  • + 0 comments

    Oracle

    select city, length(city) 
    from (select * from station order by length(city) asc, city asc)
    where rownum <= 1;
    
    SELECT CITY, LENGTH(CITY) FROM (SELECT * FROM STATION ORDER BY LENGTH(CITY) DESC, CITY DESC) WHERE ROWNUM <= 1;