I have a query:
I am trying to get a percentage of the total for each city

SELECT userLog.city,userLog.region,
COUNT(*),

/*      
Count(userLog.id) is always 1
was hoping to get the total row returned
*/
COUNT(*)/COUNT(userLog.id),

media.name,artist.name
FROM userLog,media,artist
WHERE userLog.media_id=media.id
And userLog.city != ''
AND media.artist_id = artist.id
GROUP BY userLog.city

I was hoping Count(userLog.id) would give me the total number of returned rows in the query...so I could return a percentage of the total

what would be the correct syntax to include the row total ?



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to