IT/SQL
[해커랭크] Employee Names
김보통김보름
2023. 3. 21. 23:15
728x90
반응형
문제링크 : https://www.hackerrank.com/challenges/name-of-employees/problem?isFullScreen=true
❓문제
Write a query that prints a list of employee names (i.e.: the name attribute) from the Employee table in alphabetical order.
(name을 Employee 테이블에서 뽑아라. 알파벳 순서대로.)
Input Format
The Employee table containing employee data for a company is described as follows:

where employee_id is an employee's ID number, name is their name, months is the total number of months they've been working for the company, and salary is their monthly salary.
Sample Input

❗답
SELECT name
FROM Employee
ORDER BY name
🤔풀이
알파벳순 = 오름차순
728x90