How To Use WHERE vs HAVING In Microsoft Access SQL

In this video, we will discuss the difference between the WHERE and HAVING clauses in Microsoft Access SQL. I will explain how WHERE filters individual records before grouping, while HAVING filters the grouped results after aggregation. We will walk through beginner and advanced examples, showing how to filter records before and after using aggregate functions, and highlight common mistakes when using these clauses. This lesson is intended for viewers with some basic SQL knowledge and familiarity with aggregate queries in Access. Clara from Baltimore, Maryland (a Platinum Member) asks How do I tell the difference between WHERE and HAVING in Access? I'm trying to build a query for work and I can filter my data fine at first, but once I group things together I get stuck and I'm not sure when to use one or the other. They both seem to do the same thing and it's confusing me. BECOME A MEMBER: YouTube:    / @599cd   or My Site: https://599cd.com/THMember LEARN MORE: WHERE v HAVING: https://599cd.com/WHEREvHAVING PREREQUISITES: SQL with Access: https://599cd.com/SQLwithAccess Aggregate Query: https://599cd.com/Aggregate LINKS: PEMDAS and the Order of Operations: https://599cd.com/PEMDAS RECOMMENDED COURSES: SQL Courses & Seminars: https://599cd.com/SQL FREE TEMPLATE DOWNLOADS: TechHelp Free Templates: https://599cd.com/THFree Blank Template: https://599cd.com/Blank Contact Management: https://599cd.com/Contacts Order Entry & Invoicing: https://599cd.com/Invoicing More Access Templates: https://599cd.com/AccessTemplates DIAMOND SPONSORS: More info on our Sponsors: https://599cd.com/DiamondSponsors ADDITIONAL RESOURCES: FREE Access Beginner Level 1: https://599cd.com/Free1 How to Use Access in 30 Minutes: https://599cd.com/30Minutes $1 Access Level 2: https://599cd.com/1Dollar Donate to my Tip Jar: https://599cd.com/TipJar Merch Store! Get your swag here: https://599cd.com/Merch Get on my Mailing List: https://599cd.com/YTML Contact Me: https://599cd.com/Contact TechHelp: https://599cd.com/TechHelp Consulting Help: https://599cd.com/DevNet Twitter:   / learningaccess   https://en.wikipedia.org/wiki/Microso... https://products.office.com/en-us/access https://microsoft.com/en-us/microsoft... KEYWORDS: TechHelp, Access 2016, Access 2019, Access 2021, Access 2024, Access 365, Microsoft Access, MS Access, MS Access Tutorial, #msaccess, #microsoftaccess, #help, #howto, #tutorial, #learn, #lesson, #training, #database, HAVING vs WHERE, differences between HAVING and WHERE, GROUP BY, aggregate query, COUNT function, AVG function, filter grouped results, SQL order of operations, query criteria, CustomerID, FamilySize, State, SELECT statement, aggregate functions, SQL for Access users QUESTIONS: Please feel free to post your questions or comments below. Thanks. Live long, and prosper.

How to Use ActiveForm to Determine the Previous Form in Microsoft Access
▶︎

How to Use ActiveForm to Determine the Previous Form in Microsoft Access

Learn Basic SQL in 15 Minutes | Business Intelligence For Beginners | SQL Tutorial For Beginners 1/3
▶︎

Learn Basic SQL in 15 Minutes | Business Intelligence For Beginners | SQL Tutorial For Beginners 1/3

User-Controlled Display Order, Sorting, and Renumbering in Microsoft Access - Fitness 76
▶︎

User-Controlled Display Order, Sorting, and Renumbering in Microsoft Access - Fitness 76

SQL Server for Access Users - Beginner 1 Lesson 10: Connect to SQL Server from Microsoft Access
▶︎

SQL Server for Access Users - Beginner 1 Lesson 10: Connect to SQL Server from Microsoft Access

How to Use RecordsAffected to Count Deleted Records in Microsoft Access
▶︎

How to Use RecordsAffected to Count Deleted Records in Microsoft Access

Basic Programming with Microsoft Access / VBA
▶︎

Basic Programming with Microsoft Access / VBA

Database Keys Made Easy - Primary, Foreign, Candidate, Surrogate, & Many More
▶︎

Database Keys Made Easy - Primary, Foreign, Candidate, Surrogate, & Many More

Hollyhocks Sunflower Garden Oil Painting | 4K Vintage Wallpaper Art Screensaver | Vintage Frames
▶︎

Hollyhocks Sunflower Garden Oil Painting | 4K Vintage Wallpaper Art Screensaver | Vintage Frames

Which Tool Handles 40,000 Hotel Bookings Best? | Excel vs Power Query vs SQL vs Python
▶︎

Which Tool Handles 40,000 Hotel Bookings Best? | Excel vs Power Query vs SQL vs Python

Learn SQL In 60 Minutes
▶︎

Learn SQL In 60 Minutes

But what is a neural network? | Deep learning chapter 1
▶︎

But what is a neural network? | Deep learning chapter 1

How To Get Conditional Formatting Working On Yes No Fields In Access - QQ #87
▶︎

How To Get Conditional Formatting Working On Yes No Fields In Access - QQ #87

How to Query Records by Date in Microsoft Access Up to, But Not Including Midnight
▶︎

How to Query Records by Date in Microsoft Access Up to, But Not Including Midnight

Beginner to T-SQL [Full Course]
▶︎

Beginner to T-SQL [Full Course]

Turing Award Winner: Disagreeing with Google, Postgres, Future Problems | Mike Stonebraker
▶︎

Turing Award Winner: Disagreeing with Google, Postgres, Future Problems | Mike Stonebraker

7 Simple Tricks to Instantly Make Your SQL Queries Better
▶︎

7 Simple Tricks to Instantly Make Your SQL Queries Better

Using the New Edge Browser Control in Microsoft Access
▶︎

Using the New Edge Browser Control in Microsoft Access

Trump’s Big Violent 80th Birthday Party at the White House, "Great Deal" with Iran & NY Knicks Win
▶︎

Trump’s Big Violent 80th Birthday Party at the White House, "Great Deal" with Iran & NY Knicks Win

Transformers, the tech behind LLMs | Deep Learning Chapter 5
▶︎

Transformers, the tech behind LLMs | Deep Learning Chapter 5

Tracking Employee Training and/or Certifications in Microsoft Access, Part 9
▶︎

Tracking Employee Training and/or Certifications in Microsoft Access, Part 9