HackerRank SQL: Weather Observation Station 12 외 2문제
Weather Observation Station 12:
Query the list of CITY names from STATION that do not start with vowels and do not end with vowels. Your result cannot contain duplicates.
Oracle
select distinct city
from station
where not (city like 'A%' or city like 'E%' or city like 'I%' or city like 'O%' or city like 'U%')
and not (city like '%a' or city like '%e' or city like '%i' or city like '%o' or city like '%u');
Higher Than 75 Marks:
Query the Name of any student in STUDENTS who scored higher than Marks.
Order your output by the last three characters of each name. If two or more students both have names ending in the same last three characters (i.e.: Bobby, Robby, etc.), secondary sort them by ascending ID.
select name
from students
where marks > 75
order by substr(name,-3), id;
Employee Names:
Write a query that prints a list of employee names (i.e.: the name attribute) from the Employee table in alphabetical order.
select name
from Employee
order by name asc;