[SolveSQL/난이도 2] Advent of SQL 2024(MySQL, SQLite)
·
SolveSQL/난이도 2
제목이 모음으로 끝나지 않는 영화SELECT title FROM filmWHERE ( rating = 'R' OR rating = 'NC-17' ) AND ( title NOT LIKE '%A' AND title NOT LIKE '%E' AND title NOT LIKE '%I' AND title NOT LIKE '%O' AND title NOT LIKE '%U' ) 언더스코어(_)가 포함되지 않은 데이터 찾기_에는 이스케이프 문자(\)를 추가해줘야 하는데, SQLite는 추가로 ESCAPE '\'를 붙여줘야 한다고 한다.SELECT DISTINCT(page_location) AS `page_location` FROM gaWHERE page_location N..
[SolveSQL/난이도 2] 데이터리안 SQL 데이터 분석 캠프 실전반(MySQL)
·
SolveSQL/난이도 2
레스토랑의 대목SELECT A.total_bill, A.tip, A.sex, A.smoker, A.day, A.time, A.size FROM tips AS A JOIN ( SELECT day, SUM(total_bill) AS `sales` FROM tips GROUP BY day HAVING `sales` >= 1500) AS B ON A.day = B.day 레스토랑의 요일별 VIPSELECT A.total_bill, A.tip, A.sex, A.smoker, A.day, A.time, A.size FROM tips AS A JOIN ( SELECT MAX(total_bill) as `max`, day FROM tips GROUP BY day) AS B ON (A.day = B.day) A..