select order_date as 주문일자 , product_nm as 상품명 , sum(sales) as 매출액 from edu_mx_sales where order_date between to_char( to_date ( :VS_DATE, 'yyyy-mm-dd ') - interval '3 month', 'yyyy-mm-dd ') and :VS_DATE group by order_date, product_nm order by order_date