Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
Tags
- leetcode
- sql
- L2정규화
- full request
- 클라우드컴퓨팅
- branch
- 깃헙협업
- L1정규화
- programmers
- coding
- hackerrank
- Git
- 버전충돌
- elastic net
- github
- 온라인협업
- 편향-분산 교환
- HTML
- 선형 모형
- mysql
- conflict
- RLIKE
- 교차 엔트로피
- early stopping
- AWS
- window function
- PYTHON
- 코딩공부
- merge
- CSS
Archives
- Today
- Total
Im between cherry
Hackerrank | MySQL | The Blunder 본문
The Blunder
Samantha was tasked with calculating the average monthly salaries for all employees in the EMPLOYEES table, but did not realize her keyboard's key was broken until after completing the calculation. She wants your help finding the difference between her miscalculation (using salaries with any zeroes removed), and the actual average salary.
Write a query calculating the amount of error (i.e.: actual_miscalculated average monthly salaries), and round it up to the next integer.
SELECT CEIL(AVG(salary)-AVG(REPLACE(salary,0,'')))
FROM employees
'데이터분석 > practice_query' 카테고리의 다른 글
Hackerrank | MySQL | Weather Observation Station 2 (0) | 2020.08.29 |
---|---|
Hackerrank | MySQL | Top Earners (0) | 2020.08.29 |
Hackerrank | MySQL | Population Density Difference (0) | 2020.08.28 |
Hackerrank | MySQL | Japan Population (0) | 2020.08.28 |
Hackerrank | MySQL | Average Population (0) | 2020.08.28 |
Comments