[HackerRank] The PADS
2021. 2. 8. 20:18ㆍ데이터베이스/SQL
728x90
반응형
SELECT CONCAT(Name, '(', LEFT(Occupation, 1), ')')
FROM OCCUPATIONS
ORDER BY Name ASC;
SELECT CONCAT('There are a total of ', COUNT(Occupation), ' ', LOWER(Occupation), 's.')
FROM OCCUPATIONS
GROUP BY Occupation
ORDER BY Count(Occupation), Occupation ASC;
'데이터베이스 > SQL' 카테고리의 다른 글
[HackerRank] Weather Observation Station 13 (0) | 2021.02.08 |
---|---|
[HackerRank] Weather Observation Station 2 (0) | 2021.02.08 |
[HackerRank] Revising Aggregations - The Sum Function (0) | 2021.01.25 |
[HackerRank] Revising Aggregations - The Count Function (0) | 2021.01.25 |
[HackerRank] Employee Salaries (0) | 2021.01.25 |