Counting problem

elandro

Registered User.
Local time
Today, 09:55
Joined
May 11, 2004
Messages
10
Hi there,

I'm having some trouble with the counting function.

I've a table with the following fields:

Section_title
Subsection_title

Each subsection is asociated with a section. What I need is an script that displays all that information and also counts how many of each sections are displayed. ie:

Section_title Subsection_title Count
IT bibliography 2
Users Administration 1
IT free courses 2

How can I do that that 1/2 number count appears?

PS: sorry 4 my english. thanks in advance!
 
You can do it with a Totals Query.


Type/Paste the following in the SQL View of a new query, replacing with the correct table name:-

SELECT Section_title, Subsection_title, Count(*) AS [Count]
FROM [TableName]
GROUP BY Section_title, Subsection_title;

.
 

Users who are viewing this thread

Back
Top Bottom