105 Summary Query Results Access 2019 In Practice
SKILLS COVERED IN THIS PROJECT
- Create a summary query in Design view.
- Edit a query in Design view.
- Add fields to a query.
- Execute a query.
- Save a query.
- Sort query results.
- Add aggregate functions.
- Open the NewYorkDMV-03.accdb database start file.
- The file will be renamed automatically to include your name. Change the project file name if directed to do so by your instructor.
- Enable content in the database.
- Create a new summary query in Design view. The query counts the number of tickets issued by city and violation.
- Add the Ticketstable into the Query Design window.
- Increase the size of the table object to display all of the fields.
- Add the following fields into the query: City, PrimaryFactor, and TicketNumber.
- Add the Total row to the query.
- Group By the Cityand PrimaryFactorfields and Count the TicketNumber field.
- Save the query as TicketCountByCityAndFactor.
- Run the query. The datasheet should display 22 records.
- Adjust the field column widths using AutoFit or Best Fit. The datasheet should be similar to Figure 3-104.
- Save the changes to the query.
- Save a copy of the query as TicketCountByFactor.
- Edit the TicketCountByFactorquery in Design view. The query should show the total tickets issued for each violation factor, sorted in descending order by count.
- Delete the City field.
- Sort the TicketNumber field in descending order.
- Save and run the query. The datasheet should match Figure 3-105.
- Close the query.
- Create a new summary query in Design view. The query provides summary data on the total fines assessed against each driver.
- Add both tables into the Query Design window.
- Increase the size of the table objects to display all of the fields.
- Add the following fields into the query: LicenseNumber, FirstName, LastName, Fine, and TicketNumber.
- Add the Total row to the query.
- Group By the LicenseNumber, FirstName, and LastName fields, Sum the Fine field and Count the TicketNumber field.
- Sort the Fine field in descending order.
- Add both tables into the Query Design window.
- Save the query as TicketsByDriver.
- Run the query. The datasheet should display 24 drivers who have received tickets, sorted in descending order by the total dollar amount of their fines (Figure 3-106).
- Close the query.
- Close the database.
- Upload and save your project file.
- Submit project for grading.