select * from sale_guest sg left join sale_bill sb
on sg.bill_id=sb.id where sg.gmt_create>'2023-10-20' and sb.bill_no is NULL
select * from sale_emp se left join sale_bill sb
on se.bill_id=sb.id where se.gmt_create>'2023-10-20' and sb.bill_no is NULL
select * from sale_item si left join sale_bill sb
on si.bill_id=sb.id where si.gmt_create>'2023-10-20' and sb.bill_no is NULL
delete si from sale_item si left join sale_bill sb
on si.bill_id=sb.id where si.gmt_create>'2023-10-20' and sb.bill_no is NULL
delete se from sale_emp se left join sale_bill sb
on se.bill_id=sb.id where se.gmt_create>'2023-10-20' and sb.bill_no is NULL
delete sg from sale_guest sg left join sale_bill sb
on sg.bill_id=sb.id where sg.gmt_create>'2023-10-20' and sb.bill_no is NULL