목록프로그래머스 (11)
now is better than never

https://school.programmers.co.kr/learn/courses/30/lessons/131118?language=oracle with score as (select inf.rest_id, round(avg(rev.review_score), 2) score from rest_info inf join rest_review rev on inf.rest_id = rev.rest_id group by inf.rest_id) SELECT inf.rest_id, inf.rest_name, inf.food_type , inf.favorites, inf.address , to_char(s.score, '999.99') score from rest_info inf join score s on inf.r..
MySQL SELECT member_id, member_name, gender , date_format(date_of_birth, '%Y-%m-%d') date_of_birth from member_profile where month(date_of_birth) = 3 and gender = 'W' and tlno is not null order by member_id Oracle SELECT member_id, member_name, gender , to_char(date_of_birth, 'YYYY-MM-DD') date_of_birth from member_profile where extract(month from date_of_birth) = 3 and gender = 'W' and tlno is ..
https://school.programmers.co.kr/learn/courses/30/lessons/59045 SELECT ins.animal_id, ins.animal_type, ins.name from animal_ins ins join animal_outs outs on ins.animal_id = outs.animal_id where ins.sex_upon_intake != outs.sex_upon_outcome 정석으로 풀면 SELECT ins.animal_id, ins.animal_type, ins.name from animal_ins ins join animal_outs outs on ins.animal_id = outs.animal_id where ins.sex_upon_intake L..
https://school.programmers.co.kr/learn/courses/30/lessons/144856 SELECT b.author_id, a.author_name, b.category, sum(b.price * s.sales) total_sales from book b join author a on b.author_id = a.author_id join book_sales s on b.book_id = s.book_id where s.sales_date between '2022-01-01 00:00:00' and '2022-01-31 23:59:59' group by author_name, category order by b.author_id, b.category desc; between ..