Is Grouping or Criteria Applied first?

sharpnova

Registered User.
Local time
Today, 15:41
Joined
Jun 9, 2011
Messages
69
In an Access Query, which is applied first: Grouping or Criteria?

I am trying to run a query whose results could potentially differ depending on whether the query's data set is grouped, then filtered based on criteria or filtered based on criteria, then grouped.

(i've done a little testing and it looks like criteria is applied first but i wanted to be sure)
 
Last edited:
The WHERE clause is evaluated before grouping, the HAVING clause is evaluated after. You may need to switch to SQL view to get it the way you want. Access makes guesses that aren't always correct.
 
Can you provide an example? Show the sample data that will go into the query, the results you expect and the results you fear.
 

Users who are viewing this thread

Back
Top Bottom