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