In this movie, Adam shows how to create a simple query that calculates the average value of the orders at H+ Sport. Using the SQL code for the query, Adam then uses it as a criteria in a second query to identify all of the orders that are above that average value. In this way, the query will respond dynamically to fluctuations in the average.
- [Voiceover] Using what we've seen about the SQL language,…we can use it to create dynamic query criteria…based on summary values from the database.…For example, if we wanted to find orders…that have a total value above average,…in order to do this,…we would first need to determine…what the current average order value was.…We could find that by creating a new query…in Design View, and we'll add in the Orders table…and the Products table.…Now instead of pulling fields down…from these two tables, I'm just going to come…to this first column, and we'll calculate…some data right here.…I'm going to right-click and go into the zoom window,…and let's change the font-size up…so we can see what we're doing.…
Now what I want to do is just multiple the price…times the quantity, and I'll just go ahead…and type that inside the square brackets.…Now because there's only a single price field…and a single quantity field among these two tables,…I actually don't need to specify…which tables I'm referring to.…Access is going to understand what I mean,…
- Creating a query with the wizard
- Defining query criteria
- Using comparison and wildcards in criteria
- Working with joins
- Creating parameter queries
- Using the built-in functions in Access
- Summarizing data
- Aggregating records with totals
- Working with dates
- Creating alternative queries: unmatched, crosstab, and more
- Writing queries with SQL
Skill Level Intermediate
1. Introduction to Access Queries
2. Creating Simple Select Queries
3. Creating Parameter Queries
4. Use the Built-In Functions
5. Aggregating Records with a Totals Query
6. Working with Dates in Queries
7. Understanding Program Flow Functions
8. Alternative Query Types
9. Writing Queries with Structured Query Language
Explore the basics of SQL5m 59s
10. Useful Query Tricks
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.