Start New Discussion within our Databases Community

I have a table ...
Ratings (userid, movieid, ratings, time)
where ...
select count(*) from ratings where userid = X; (No of ratings of a particular user)

Here, X ranges from 1-6040!

How should I get the count of each user and then store it in another table 'Users' in the attribute 'countUsers' ?

Please help !

If you want to store the result into empty table:

SELECT userid, count(*) 
FROM ratings 
GROUP BY userid
This article has been dead for over six months. Start a new discussion instead.