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 | 31 |
Tags
- PYTHON
- sql
- window function
- elastic net
- CSS
- full request
- 깃헙협업
- Git
- 교차 엔트로피
- 온라인협업
- leetcode
- 코딩공부
- 선형 모형
- programmers
- L1정규화
- 편향-분산 교환
- L2정규화
- branch
- hackerrank
- github
- HTML
- coding
- RLIKE
- mysql
- early stopping
- conflict
- 버전충돌
- 클라우드컴퓨팅
- merge
- AWS
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