Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Given the table information above, create the following queries using SQL: Query

ID: 672617 • Letter: G

Question

Given the table information above, create the following queries using SQL:

Query 1: Find all the product IDs and product names of products selling with a unit price of $18.00 or greater. Only show product ID and product name columns.

Query 2: Find all the product names of products with more than 20 units currently in stock selling with a unit price of more than $9.10 and less than $18.00.

Query 3: Find which customer IDs placed orders during the period of July 8 through August 8 of 1996. Show customer ID and order date.

Query 4: Find which supplier IDs carry products with "hockey" as part of the product name. Show the product name and supplier ID columns.

Query 5: Find one copy of each type of contact title in the customers table. Show contact title column.

Explanation / Answer

Query1:

select ProductID , ProductName from Products where UnitPrice>=18;

Query2:

select ProductName from Products where UnitPrice>9 and UnitPrice<18 and UnitsInStock>20;

Query3:

select c.CustomerID, o.OrderDate from Customers as c, Orders as o where c.CustomerID=o.CustomerID and o.OrderDate>'1996-07-08' and o.OrderDate<'1996-08-08';

Query4:

select s.SupplierID, p.ProductName from Products as p, Suppliers as s where s.SupplierID=p.SupplierID and p.ProductName='hockey';

Query5:

select distinct ContactTitle from Customers;


Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote