Weather Observation Station 11

  • + 0 comments

    MYSQL: WITH VowelCities AS ( SELECT DISTINCT CITY, ROW_NUMBER() OVER (PARTITION BY CITY ORDER BY CITY) AS rn FROM STATION WHERE NOT (UPPER(CITY) LIKE 'A%' OR UPPER(CITY) LIKE 'E%' OR UPPER(CITY) LIKE 'I%' OR UPPER(CITY) LIKE 'O%' OR UPPER(CITY) LIKE 'U%') OR NOT (UPPER(CITY) LIKE '%A' OR UPPER(CITY) LIKE '%E' OR UPPER(CITY) LIKE '%I' OR UPPER(CITY) LIKE '%O' OR UPPER(CITY) LIKE '%U') ) SELECT CITY FROM VowelCities WHERE rn = 1;