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.
  • HackerRank Home

    HackerRank

  • |
  • Prepare
  • Certify
  • Compete
  • Hiring developers?
  1. Prepare
  2. SQL
  3. Basic Select
  4. Weather Observation Station 11
  5. Discussions

Weather Observation Station 11

Problem
Submissions
Leaderboard
Discussions

Sort 2783 Discussions, By:

recency

Please Login in order to post a comment

  • raeebhagat
    13 hours ago+ 0 comments

    MySQL select distinct city from station where city regexp '^[^aeiou].*[^aeiou]$';

    0|
    Permalink
  • mag23esh
    21 hours ago+ 0 comments

    FOR ORACLE:

    select distinct city from station where (((city not like 'A%') and (city not like 'E%') and (city not like 'I%') and (city not like 'O%') and(city not like 'U%')) or ((city not like '%a') and(city not like '%e') and (city not like '%i') and (city not like '%o') and (city not like '%u')));

    0|
    Permalink
  • rizalafri09
    1 day ago+ 0 comments

    SELECT DISTINCT city FROM station WHERE left(city, 1) NOT IN ('A', 'E', 'I', 'O', 'U') OR right(city, 1) NOT IN ('a', 'e', 'i', 'o', 'u');

    THIS ONE IS CORRECT

    0|
    Permalink
  • Revanthprabhu143
    1 day ago+ 0 comments

    MS SQL SERVER

    11TH ANSWER select distinct(city) from station where city not like '[aeiou]%' or city not like '%[aeiou]'

    0|
    Permalink
  • medeirosjpro
    3 days ago+ 1 comment

    SQL SERVER

    SELECT DISTINCT City FROM Station WHERE LEFT(City,1) NOT LIKE '%[aeiou]' OR RIGHT(City,1) NOT LIKE '%[aeiou]'

    0|
    Permalink
Load more conversations

Need Help?


View top submissions
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy