Weather Observation Station 5

Sort by

recency

|

7265 Discussions

|

  • + 0 comments

    /* We find the city with the shortest name length*/ SELECT CITY, LENGTH(CITY) FROM STATION ORDER BY LENGTH(CITY) DESC, CITY ASC LIMIT 1; /And the we find the one with the longest name length/ SELECT CITY, LENGTH(CITY) FROM STATION ORDER BY LENGTH(CITY) ASC, CITY ASC LIMIT 1;

  • + 0 comments

    SELECT TOP 1 CITY,LEN(CITY) FROM STATION ORDER BY LEN(CITY) ASC, CITY ASC;

    SELECT TOP 1 CITY,LEN(CITY) FROM STATION ORDER BY LEN(CITY) DESC, CITY DESC;

  • + 0 comments

    SELECT CITY, LENGTH(CITY) FROM STATION WHERE ID IN ((SELECT ID FROM STATION ORDER BY LENGTH(CITY), CITY LIMIT 1),(SELECT ID FROM STATION ORDER BY LENGTH(CITY) DESC, CITY LIMIT 1));

  • + 0 comments

    /* Finds smallest city name */

    Select City, Length(City) From Station Order by Length(City), City ASC Limit 1;

    /* Finds Longest city name*/

    Select City, Length(City) From Station Order by Length(City) DESC, City ASC Limit 1;

  • + 0 comments
    select
    city,
    char_length(city)
    from STATION
    where city =
        (select
            city
        from STATION
        where char_length(city) = 
            (select min(char_length(city))
            from STATION order by city)
        order by city
        limit 1)
    or city =
        (select
            city
        from STATION
        where char_length(city) = 
            (select max(char_length(city))
            from STATION order by city)
        order by city
        limit 1);