Problem : https://www.hackerrank.com/challenges/weather-observation-station-9/problem
Solution :
/*
Enter your query here.
*/
SELECT DISTINCT CITY FROM STATION WHERE LEFT(CITY,1) NOT IN ('a','e','i','o','u');
Problem : https://www.hackerrank.com/challenges/weather-observation-station-9/problem
Solution :
/*
Enter your query here.
*/
SELECT DISTINCT CITY FROM STATION WHERE LEFT(CITY,1) NOT IN ('a','e','i','o','u');
Problem : https://www.hackerrank.com/challenges/weather-observation-station-5/problem
Solution :
/*
Enter your query here.
*/
(
SELECT CITY , LENGTH(CITY) FROM STATION ORDER BY LENGTH(CITY), CITY LIMIT 1
)
UNION
(
SELECT CITY , LENGTH(CITY) FROM STATION ORDER BY LENGTH(CITY) DESC, CITY LIMIT 1
);
Solution :
SELECT NAME FROM CITY WHERE COUNTRYCODE = "JPN";