반응형

@notepad_jj2

츄르사려고 코딩하는집사입니다.


1. [HackerRank] Employee Names 오라클(Oracle)

 

2. 문제 출처

https://www.hackerrank.com/challenges/name-of-employees/problem

 

Employee Names | HackerRank

Print employee names.

www.hackerrank.com

 

3. 문제

Write a query that prints a list of employee names (i.e.: the name attribute) from the Employee table in alphabetical order.

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

Sample Output

Angela Bonnie Frank Joe Kimberly Lisa Michael Patrick Rose Todd

 

4. 풀이

- 이 문제는 EMPLOYEE라는 테이블에서 이름을 알파벳 순으로 정렬하여 NAME COLUMN만 출력하면 되는 문제다.

- 코드는 아래처럼 짜도 상관 없다.

 

5. 소스 코드

 

SELECT NAME
FROM EMPLOYEE
ORDER BY NAME;

 


반응형
  • 네이버 블러그 공유하기
  • 네이버 밴드에 공유하기
  • 페이스북 공유하기
  • 카카오스토리 공유하기