Reference no: EM133414674
Question: For each information request below, formulate a single SQL query to produce the required information. In each case, you should display only the columns requested. Be sure that your queries do not produce duplicate records unless otherwise directed
1. Give date and the sum of tax and shipping for each sale from December 20th through December 25th of 2015. (use BETWEEN. Name the calculated column SUM)
NOTE: Due to an anomoly within MySQL for numeric fields, sometimes calculated results have 14 decimal places and inexact amounts. To ensure your answer is correct use the ROUND function to two decimal places, i.e. ROUND(Tax+Shipping,
2. List the data in the Salaried Employees table about Salaried Employees earning between $40000 and $50000. (use between)
3. Give Customer IDs and cities for customers who are located in Chicago, Saint Louis, Baltimore, or Newark. (Use the IN operator.)
4. What is the customerID for Sam Gill?
5. Give the sales data for sales where sales tax was charged and total of tax and shipping is less than $15. (use the NOT operation.) Show all sales data.
6. Create an alphabetical list of names (first and last, alphabetized by last) of customers in Minnesota.
7. Give names of manufacturers and their cities that are located in cities with names ending with 'City'.
8. List the information of each sale item where 2 or more items were sold but only for sizes 5, 6, and 7 (Use the keyword IN.) Show all sale item information.
9. Give all the data for sales from January 21 of 2015 through the end of the month. (Use BETWEEN)
10. What is the first and last name of customer 610?
11. List Employee names (first and last) of employees who manage themselves or have a null value as the manager id.
12. Give full names of customers that have a 'D' as the third character in their last names. Make your query case insensitive. Eliminate duplicates.
13. What is the full name and phone number of employee 170?
14. What are the sales dates and shipping amount of sales with over $55 of shipping charges?
15. Give names of manufacturers and their cities that are located in cities with names starting with 'C'.