문제
Write a query that prints a list of employee names (i.e.: the name attribute) from the Employee table in alphabetical order.
employee 테이블에서 이름(name)을 알피벳 순으로 출력하라
정답
select name
from employee
order by name;
배운 점
기본적으로 order by 는 asc 오름차순이다 따라서 디폴트가 asc니까 굳이 안 적어도 된다.
'일일 문제 풀이 > HackerRank' 카테고리의 다른 글
[SQL] 해커랭크 HackerRank 문제 풀이 Type of Triangle - Advanced Select (0) | 2025.03.11 |
---|---|
[SQL] 해커랭크 HackerRank 문제 풀이 Employee Salaries (0) | 2025.03.10 |
[SQL] 해커랭크 HackerRank 문제 풀이 Higher Than 75 Marks (0) | 2025.03.08 |
[SQL] HackerRank 해커랭크 문제 풀이 Weather Observation Station 12 (0) | 2025.03.07 |
[SQL] HackerRank Weather Observation Station 11 hankerrank 문제풀이 정답 (0) | 2025.03.06 |