SELECT * FROM lsps_order_record_commossion orc INNER JOIN lsps_posts order_post ON (orc.order_id=order_post.ID AND order_post.post_status IN ('wc-processing', 'wc-completed')) WHERE payment_status_done=0 AND WEEK(order_post.post_date)=WEEK(NOW()) - 1