SQL query, SELECT (Count/Count ) ...??
Date: 14 Mar 2003 12:20:01 -0800
Message-ID: <eba8d801.0303141220.55d65544_at_posting.google.com>
I have a table column containing Registered Users IDs related to
tickets
So basically i need to do a divide of the number of Registered users
by the number of occurence in this column...
here is what i ve been working on:
(B)
they bought. If the ticket was bought by a non registered user, the
value 'na'
is entered.
Now, I need to find the percentage of the Registered Users that bought
tickets.
(A)
SELECT COUNT(pv1.idabonne)
FROM placevendues pv1
WHERE pv1.idabonne != 'na';
this counts the number of Registered users who bought tickets (Ex.:let
s say 30)
SELECT COUNT(pv1.idabonne)
this counts the number of lines in my table (Ex.:let s say 50)
Now.. how can I do some sort of Select A/B*100 so i can have the percentage i want...? which would be 30/50*100 = 60%
Thanks
Louis Gagnon
-Comp. Eng. Student-
Received on Fri Mar 14 2003 - 21:20:01 CET