1:update qr_user_info set score =score+50 where level=3
2:delete from qr_user_info where level is null;
3:第一种:select * from qr_order_info where user_id =(select id from qr_user_info where name='张三')
第二种:select a.* from qr_order_info a,qr_user_info b where a.user_id=b.id and b.name='张三'
4:select qu.user_id ,sum(total_amount) from qr_user_info qu left join
(select sum(total_amount) user_id from qr_order_info where create_date=curdate() group by sum(total_amount),user_id ) qa
on qu.id=qa.user_id