Forums
This topic is locked
select count
Posted 22 years ago
1
has voted
22 years ago chris espino posted:
I'm able to figure this out, but blacked out when it's time to add the count expression.SELECT Distinct Users
FROM Posts
ORDER BY Users ASC
now, I'd like to add a count on every posts the user has beside their name.
kind of like:
Ben 15 Posts
Chris 2 Posts
Jack 9 Posts etc.
SELECT Distinct Users
(SELECT Count(Users)
Where ... ok this is where I get stuck!)
As Total_Posts
FROM Posts
ORDER BY Users ASC
thanks in advance!
Replies
Replied 22 years ago
22 years ago Dave Thomas replied:
Try something like
SELECT users, count(total_posts)
FROM posts
WHERE total_posts > 0
ORDER BY total_posts DESC;
Regards,
Dave
UD4 || Flash || Access ||Web Hosting
Edited by - UltraDav on 20 Aug 2002 16:20:14
SELECT users, count(total_posts)
FROM posts
WHERE total_posts > 0
ORDER BY total_posts DESC;
Regards,
Dave
UD4 || Flash || Access ||Web Hosting
Edited by - UltraDav on 20 Aug 2002 16:20:14