1. 조건에 부합하는 중고거래 댓글 조회하기

SELECT
a.title,
a.board_id,
b.reply_id,
b.writer_id,
b.contents,
DATE_FORMAT(b.created_date, '%Y-%m-%d') AS created_date
FROM
used_goods_board AS a
JOIN
used_goods_reply AS b
ON a.board_id = b.board_id
WHERE
DATE(a.created_date) BETWEEN '2022-10-01' AND '2022-10-31'
ORDER BY
b.created_date ASC,
a.title ASC;
2. 인기있는 아이스크림

SELECT flavor FROM first_half ORDER BY total_order DESC, shipment_id ASC;
Share article