Download presentation
Presentation is loading. Please wait.
Published byEverett Lamb Modified over 9 years ago
1
Structured Query Language SQL Unit 4 Solving Problems with SQL
2
Using the MusicList table, design a single table query that will: a. List Artist, Album name and Title b. For all albums that have an Artist name that has a “W” anywhere in the Artist name c. Use the WHERE clause with LIKE Exercise 1
3
Exercise 2 Using the Customers table, design a single table query that will: a. Use the “AS” keyword to change the fieldname of 1. CompanyName to “Company” 2. ContactName to “Contact Guy” 3. ContactTitle to “Title” b. Use the ORDER BY keyword to sort the CompanName field in Ascending order
4
Exercise 3 Using the Budget table, find the total amount of Actual budget expenditures for the entire set of Divisions with the aggregate functions below Use the following output fields: a. Sum of Actuals – SUM() b. Average of Actuals – AVG() c. MAX and MIN of Actuals – MAX() and MIN() d. Standard deviation – stddev()
5
Exercise 4 Using Exercise 3, add to the SQL code so that the Category of the aggregate amounts is specific to “Facility” Use the WHERE keyword and the IN function Display the following fields: a. Division b. Department c. Category d. Item, Budget, Actual and Variance
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.