Jump to content

sql menager


odeg

Recommended Posts

Cześć, jak powinno wyglądac zapytanie do menadżera sql żeby wyświetlił maile klientów którzy zakupili przedmioty z wybranej kategorii? Znalazłem jak zrobić po produkcie, ale szukam sposobu po kategorii

SELECT C.email FROM ps_customer C

INNER JOIN ps_orders O on C.id_customer = O.id_customer

INNER JOIN ps_order_detail OD on O.id_order = OD.id_order

WHERE OD.product_id =959

Edited by odeg (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...