I have a question about how to retrieve data from one customer's order table (Oracle) like this:
id customer cake top
1 001 chocolate cream
2 002 chocolate jam
3 002 vanilla cream
4 003 banana cream
I want to know all orders from customers whose order includes chocolate cake.
The right result should be
id customer cake top
1 001 chocolate cream
2 002 chocolate jam
3 002 vanilla cream
I could do this by 2 separate queries in SQL, but is there any way to do this in a single query?
Many Thanks!
mysql,postgresql,sql-server,oracleordb2- or something else entirely.