SQL Query 1 (Join)
Find all companies, which supply a particular part with the cost less than that specified by the user. You are required to only display the companies name and its address.
Assume the user chooses the knobsupply it at cost less than 1000 dollars.
Find all parts that are sold by a company. In this case the user just specifies the company name. Given the company name you are expected to list out cost for each part that it sells. The cost displayed is sum of the part
Assume the user wants to see all parts sold by the company lappens.
Find the company, which sells all parttypes.
The user just wants to see the name of the companies, which sell all the parttypes with their locations and mailing addresses.
The customer wants to see all the purchases that he has made within the last 60 days. This means that he wants to see all parts purchased within the last 60 days
Give me the list of companies that I have brought an item from even if I have purchased an item from the company list it. The user wants to see all the companies including those from whom he has purchased an item.
Suppose a company wants to find out each user who has purchased a part from his company. The company wants the results in a sorted manner with the user who has purchased the parts listed in decreasing order of the number of parts purchased. The user who purchased the maximum number of parts is to be listed first, and the one who has purchased the least number is listed last.
Assume that the company name is lappens. It wants to see which customer has made the maximum purchases from the company.
Suppose the company is interested in finding only those users who have purchased more than 5 parts. Each part should have cost greater than a certain amount specified by the company.