The document contains several SQL queries: 1) Selects all columns from two tables, tblProducts and tblProductSales. 2) Selects specific columns from tblProducts where the id is not in a subquery selecting ids from tblProductSales. 3) Left joins tblProducts and tblProductSales on their id columns and selects columns where the joined id from tblProductSales is null. 4) Selects name and total quantity sold from a subquery grouped by product name from tblProducts. 5) Left joins and groups tblProducts and tblProductSales to select name and total quantity sold grouped by name.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
128 views1 page
Subqueries by Kudvenkat
The document contains several SQL queries: 1) Selects all columns from two tables, tblProducts and tblProductSales. 2) Selects specific columns from tblProducts where the id is not in a subquery selecting ids from tblProductSales. 3) Left joins tblProducts and tblProductSales on their id columns and selects columns where the joined id from tblProductSales is null. 4) Selects name and total quantity sold from a subquery grouped by product name from tblProducts. 5) Left joins and groups tblProducts and tblProductSales to select name and total quantity sold grouped by name.