koutsio koutsio - 5 months ago 10
SQL Question

what is the true sql statement for show something like list of products

sorry for this dumb question .. but how can I show the products ( description , serial number, price ) purchased by the customer "Peacock cafe bar"
in the picture i show 3 tables
tables xampp

i have try with

select

from

where(
select
from

as

where
“”)

Answer

As I remember you should use joint query on your tables, something like:

select * from ProductsTable as Products
join on  
(select Buys.ProCode* from CustomerTable as Customer
join BuysTable as Buys
on Customer.code = Buys.custcode) as customerbuys
on Products.code = customerbuys.ProCode
Comments