Learning Goal: I’m working on a databases exercise and need an explanation and answer to help me learn.
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’.
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.Read more
Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.Read more
Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.Read more
Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.Read more
By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.Read more