728x90
❓ Question
https://www.hackerrank.com/challenges/revising-aggregations-the-average-function
❗ Answer
SELECT AVG(population)
FROM city
WHERE district='California';
📌 Discussion
- where로 조건에 맞는 레코드 불러온 후 avg로 집계
'SQL 문제풀이' 카테고리의 다른 글
[해커랭크 SQL] Aggregation - Japan Population (0) | 2023.08.23 |
---|---|
[해커랭크 SQL] Aggregation - Average Population (0) | 2023.08.23 |
[해커랭크 SQL] Aggregation - Revising Aggregations - The Sum Function (0) | 2023.08.23 |
[해커랭크 SQL] Basic Join - Average Population of Each Continent (0) | 2023.08.23 |
[해커랭크 SQL] Basic Join - African Cities (0) | 2023.08.22 |