Weather Observation Station 6

Sort by

recency

|

4934 Discussions

|

  • + 0 comments

    /* Enter your query here. */ select distinct CITY from STATION where CITY like "a%" or CITY like "e%" or CITY like "i%" or CITY like "o%" or CITY like "u%";

  • + 0 comments

    /* SELECT DISTINCT CITY FROM STATION WHERE CITY REGEXP '^[aeiouAEIOU]'

    What ^ and $ mean in regex

    ^ → anchors the match to the start of the string.

    $ → anchors the match to the end of the string.

    So:

    ^A → means the string starts with A.

    A$ → means the string ends with A.

    ^A$ → means the string is exactly just "A", no more, no less.

    What [] means

    Square brackets [...] let you define a set of characters.

    The regex will match any one character from inside the brackets.

    [abc] → matches a, b, or c (just one character).

    "cat" (matches c)

    "bat" (matches b)

    "dog" (no match at first character).

    [0-9] → matches any single digit from 0 to 9.

    [A-Z] → matches any uppercase letter.

    [a-zA-Z] → matches any uppercase or lowercase letter. */

  • + 0 comments

    SELECT DISTINCT CITY FROM STATION WHERE CITY LIKE 'A%' OR CITY LIKE 'E%' OR CITY LIKE 'I%' OR CITY LIKE 'O%' OR CITY LIKE 'U%';

  • + 0 comments

    select distinct city from station where city like 'a%' or city like 'e%' or city like 'i%' or city like 'o%' or city like 'u%';

  • + 0 comments

    For MySQL

    SELECT DISTINCT city FROM station
    WHERE SUBSTR(city, 1, 1) IN ("a", "e", "i", "o", "u");