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