count rows

G

Guest

When I right click on the background of the Diagram pane, in order to choose
'Group By' from the shortcut menu, no shortcut menu appears!

What I need to do is simple:

Given these data:
Pot I.D.
22
22
21
118
118

I would like an out put that counts the pots and outputs the number of pots
with each Pot I.D. :
Pot I.D. # of pots
22 2
21 1
118 2

Thanks!
 
G

Guest

JAS,

Not sure exactly to what you're referring re: the Diagram pane, but the
query you need, assuming the data comes from table "POT", would be:

SELECT pot.[Pot ID], Count(pot.[Pot ID]) AS [# of pots]
FROM pot
GROUP BY pot.[Pot ID];

HTH,
Paul
 
J

John Spencer (MVP)

I don't think you do that from the right click menu.

Try Selecting View:Totals from the menu.
 

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