SELECT
prime_genre,
COUNT(*) AS count
FROM
`vaulted-cogency-295111.practice.appstore`
GROUP BY
prime_genre
ORDER BY
2 DESC
;
WITH sub AS
(
SELECT DISTINCT
percentile_disc(rating_count_tot, 0.9) OVER() AS Benchmark_rating
FROM
`vaulted-cogency-295111.practice.appstore`
)
SELECT
prime_genre,
COUNT(id) AS count
FROM
`vaulted-cogency-295111.practice.appstore` AS main,
sub
WHERE
rating_count_tot >= Benchmark_rating
GROUP BY
prime_genre
ORDER BY
2 DESC
;
SELECT
prime_genre,
SUM(rating_count_tot) AS total_rate
FROM
`vaulted-cogency-295111.practice.appstore`
GROUP BY
prime_genre
ORDER BY
2 DESC
;
SELECT
prime_genre,
ROUND(AVG(rating_count_tot), 2) AS avg_rate_count
FROM
`vaulted-cogency-295111.practice.appstore`
GROUP BY
prime_genre
ORDER BY
2 DESC
;
SELECT
prime_genre,
ROUND(AVG(user_rating), 2) AS avg_rating
FROM
`vaulted-cogency-295111.practice.appstore`
WHERE
rating_count_tot >= 100
GROUP BY
prime_genre
ORDER BY
2 DESC
;
분석 결과는 스프레드 시트로 정리하였다.
쿼리 실행 결과를 복사하여 옮기고, Column 명을 수정하고 배경색을 수정하는 등의 작업을 거쳤다.
또한 이해를 돕기 위한 막대 차트도 추가하였다.
https://docs.google.com/spreadsheets/d/1PLXItydxFzP6C89GcU9OX7ILZphNwHspJ2u-2qM5lHY/edit?usp=sharing