select sum(amount),sum(card_number) from sy_user inner join sy_admin on sy_user.customer_id=sy_admin.admin_id inner join sy_user_charge_log on sy_user.username=sy_user_charge_log.username where status = 1 and customer_id = 2;…
SELECT o. * FROM hq_goods g LEFT JOIN hq_orders o ON o.goods_id = g.id WHERE o.user_id =73 AND o.state =1 AND o.id not in( select c.order_id from hq_comment as c where c.user_id=73 and c.goods_id=g.id ) LIMIT 0 , 30…