Create a query to retrieve the customerID, orderid, order date, shipping cost and shipping date of orders
Question:
- Create a query to retrieve the customerID, orderid, order date, shipping cost and shipping date of orders if the shipping date is between April 3, 2014 and July 5, 2015 and shipping cost is greater than or equal to 40.
2. Create a query to retrieve first name, last name, and zip of the customers where the first digit of zip code is 1 or 3 and the last digit is any number between 3 and 7. Zip code is 5 digits code.
3. Create a query to retrieve ShipperID and the total shipping cost by ShipperID named as"TotalShippingCost" for all orders in the Orders table.
4. Create a query to retrieve all products whose unit price is above the average unit price. The SQL query should use Subquery that shows product name and product unit price from Products table. Order the output by the product unit price, largest first (descending order). The query output should be like the following table.
Create a query to retrieve the number of customers who had orders after March 17, 2015 (including this date) in each state. The SQL query should use Subquery to show the number of customers (named "total_customer") by state. The query output should be like the following table.
Create a query to retrieve a list of product inventory quantities and their respective supplier. The query should include company name of supplier (from Suppliers table), product name, units in stock, and units on order (from Products table). Sort the results alphabetically by company name. The query output should be like the following table.
Create a query to retrieve all products and each product's total quantity of orders. The SQL query should show the product name (from Products table) and the total quantity of orders (quantity column from Productsorders table) for each product (named "TotalOrders"). Order the output by the TotalOrders, largest first. The query output should be like the following table.
Create a query to retrieve all products that had been ordered by customer id = 2. The SQL query should show order id, order date (from Orders table) , product ID, and product name (from Products table). Sort the results by orderdate with ascending order so that the older appear first. The query output should be like the following table.
Auditing The Art and Science of Assurance Engagements
ISBN: 978-0133405507
13th Canadian edition
Authors: Alvin A. Arens, Randal J. Elder, Mark S. Beasley, Joanne C. Jones