Simple query

morlan

Registered User.
Local time
Today, 19:14
Joined
Apr 23, 2003
Messages
143
Hello people, what a pleasent day it is.
I was wondering if you could help me with this simple query.


Here's my table:

tblMain

ID-----SalesExec----PPP

001---John-----------0
002---John-----------1
003---John-----------1
004---John-----------1
005---Fred-----------0
006---Fred-----------0
007---Fred-----------1
008---Pat------------1
009---Pat------------0
010---Pat------------0


Simple query:

Count '1' in PPP column = PPP_TakeUp
Count ID to get total records = Total


Query result:

qryPPP_TakeUp

SalesExec ----PPP_TakeUp--------Total

John-----------3----------------------4
Fred-----------1----------------------3
Pat-------------1---------------------3


Any help appreciated! :) :)
 
Last edited:
Is there a question to accompany that or were just wanting to show us all your query? ;)
 
Mile-O-Phile said:
Is there a question to accompany that or were just wanting to show us all your query? ;)

Of course, read again ;)
 
Still don't see a question but I'm guessing that the bit at the bottom is your desired result. Questions are typically concluded with a ? :rolleyes:

Still, since I'm guessing you are looking for the result at the bottom, here's the SQL

SELECT tblMain.SalesExec, Sum(tblMain.PPP) AS PPP_TakeUp, Count(tblMain.PPP) AS Total
FROM tblMain
GROUP BY tblMain.SalesExec;
 
Thanks m8.

Heres a question:

What and where is the world's largest sculpture?
 
morlan said:
What and where is the world's largest sculpture?

Now, do you mean the largest man-made sculpture in the world, or the world's largest sculpture (i.e. scultped by nature) ? :rolleyes:
 
Mile-O-Phile said:


Now, do you mean the largest man-made sculpture in the world, or the world's largest sculpture (i.e. scultped by nature) ? :rolleyes:

Manmade... tip: it was only erected in the past year and resides in Europe...
 
I appreciate that Crazy Horse is not completed yet , but why is Mount Rushmore discounted from the answer? Surely its bigger than any indoor sculpture or did I miss something?

Brian
 
Last edited:
morlan said:

Not menmade. Rushmore, itself, was never completed either - I think it has been since.
 
Wow talk about splitting hairs! Yep as far as I know Mt Rushmore is now complete

Brian
 

Users who are viewing this thread

Back
Top Bottom