select order_num,sum(item_price*quantity) s from OrderItems group by order_num having s >= 1000 // 分组聚合 order by order_num asc // 按订单好升序排列