totaling & grouping reocrds in a field

andrewvranjes

Registered User.
Local time
Today, 23:53
Joined
Jun 19, 2002
Messages
23
hi there!

i have to say this is the best site! i have have gained excellent knowledge in the past month.

i have another problem though, i have a query which displays the common fualts for BP and i need to total it by fault, and display them in order of most common to least common.

i have a query which selects the faults firstly, then selects BP, so now all i have to do is group them by the most common faults.

any help will be greatly appreciated!

thanks!@

i have included the file aswell!
 

Attachments

SELECT [Service Type Fault], Count(*) as NumOfFaults
FROM Query3
GROUP BY [Service Type Fault]
ORDER BY Count(*) DESC
 
im a idiot

hi jon,

i understand what your sql does, but i dont understand where i should run it from.

SELECT [Service Type Fault], Count(*) as NumOfFaults
FROM Query3
GROUP BY [Service Type Fault]
ORDER BY Count(*) DESC

should i copy/paste into my original query?

i trieed this to no avail.

thanks for your time

Andrew
 
Copy and paste it to the SQL View of a new query and run it from there.

I assume Query3 is the query you used to create the Excel file. A query can be based upon a table or another query.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom