Needing help with subselects.
Posted: Mon Aug 17, 2009 1:19 am
Hi hope somebody can help me. I have been trying to get this to work for the passed week now. (I must not be to bright).
I have two tabels "clients" and "orders". In "clients" are the client's info. In orders are the clients id and product (books) and language of the book.
CLIENTS:
id
Name
Address
Email
ORDERS:
Client_id (same as id in "clients")
Order
Language
The "orders" table holds multiple orders per client:
Client_id = 10
Order = book1
Language = Germ
Client_id = 10
Order = book2
Language = Germ
Client_id = 15
Order = book1
Language = Germ
Client_id = 15
Order = book3
Language = Eng
Now what I need is a select query that will find all the clients (just id) that has placed an order for just book1 and book2 and no other books and the language must be Germ.
Can someone plea.......se help?
Thanks
I have two tabels "clients" and "orders". In "clients" are the client's info. In orders are the clients id and product (books) and language of the book.
CLIENTS:
id
Name
Address
ORDERS:
Client_id (same as id in "clients")
Order
Language
The "orders" table holds multiple orders per client:
Client_id = 10
Order = book1
Language = Germ
Client_id = 10
Order = book2
Language = Germ
Client_id = 15
Order = book1
Language = Germ
Client_id = 15
Order = book3
Language = Eng
Now what I need is a select query that will find all the clients (just id) that has placed an order for just book1 and book2 and no other books and the language must be Germ.
Can someone plea.......se help?
Thanks