solvesql3 [solvesql][SQLite] 할부는 몇 개월로 해드릴까요 https://solvesql.com/problems/installment-month/ https://solvesql.com/problems/installment-month/ solvesql.com select payment_installments, count(distinct order_id) as order_count, min(payment_value) as min_value, max(payment_value) as max_value, avg(payment_value) as avg_value from olist_order_payments_dataset where payment_type = 'credit_card' group by payment_installments min, max, avg 등의 집계함.. 2023. 12. 7. [solvesql][SQLite] 복수 국적 메달 수상한 선수 찾기 https://solvesql.com/problems/multiple-medalist/ https://solvesql.com/problems/multiple-medalist/ solvesql.com select name from athletes a left join records r on a.id = r.athlete_id left join games g on r.game_id = g.id left join teams t on r.team_id = t.id where g.year >= '2000' and r.medal is not null group by a.id having count(distinct team) >= 2 order by name asc 필요한 데이터들이 4개의 테이블에 흩어져있어서 jo.. 2023. 12. 7. [solvesql][SQLite] 지역별 주문의 특징 https://solvesql.com/problems/characteristics-of-orders/ https://solvesql.com/problems/characteristics-of-orders/ solvesql.com select a.region as Region, count(distinct a.order_id) as 'Furniture', b.'Office Supplies', c.Technology from records a left join (select region, count(distinct order_id) as 'Office Supplies' from records where category = 'Office Supplies' group by region) b on a.region =.. 2023. 12. 6. 이전 1 다음