hod5783/d5.sql

8 lines
300 B
MySQL
Raw Normal View History

2023-01-03 23:05:32 +00:00
select * from orders as o
left join orders_items as oi on (oi.orderid = o.orderid)
left join customers as c on (o.customerid = c.customerid)
2023-01-03 23:05:32 +00:00
where oi.sku in (select sku from products where "desc" like '%Cat Food%')
and citystatezip like 'Queens Village%'
order by phone;
-- there is only one woman!