Is Group By sequence important?

R

Razor

Hi,

In a "Totals" (Group By) query, I want to group by 2
fields and apply group functions on some third field (sum
or count).

Does the order with which I group matter?

i.e. Is ...group by A,B...
equivalent to
Group by B,A...

in terms of the resultsets I obtain?

Can I be indifferent between these 2 queries?

Thanks,

Razor
 
V

Van T. Dinh

The groups are divided as Cartesian product groups so I don't think the
order of the Fields in the GROUP BY clause makes any difference.

HTH
Van T. Dinh
MVP (Access)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top