[SolveSQL/난이도 1] Advent of SQL 2024(MySQL, SQLite)
·
SolveSQL/난이도 1
크리스마스 게임 찾기SELECT game_id, name, year FROM gamesWHERE name LIKE '%Christmas%' OR name LIKE '%Santa%' 펭귄 조사하기SELECT DISTINCT(species), island FROM penguinsORDER BY island ASC, species ASC 지자체별 따릉이 정류소 개수 세기SELECT local, COUNT(*) as `num_stations` FROM stationGROUP BY localORDER BY `num_stations` ASC 메리 크리스마스 2024SELECT 'Merry Christmas!'
[SolveSQL/난이도 1] 데이터리안 SQL 데이터 분석 캠프 실전반(MySQL)
·
SolveSQL/난이도 1
첫 주문과 마지막 주문DATE()를 사용하면 yyyy-MM-dd 형태로 변환된다.SELECT DATE(MIN(order_purchase_timestamp)) AS `first_order_date`,DATE(MAX(order_purchase_timestamp)) AS `last_order_date`FROM olist_orders_datasetORDER BY order_purchase_timestamp 많이 주문한 테이블 찾기SELECT * FROM tipsWHERE total_bill > (SELECT AVG(total_bill) FROM tips) 레스토랑의 일일 평균 매출액 계산하기SELECT ROUND(AVG(`sales`), 2) AS `avg_sales` FROM ( SELECT day, SUM..