Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
jgonzalez14
Yak Posting Veteran
73 Posts |
Posted - 2008-11-24 : 18:52:49
|
| For some reason this isn't working, I want to list all ratings and the number of movies for each rating wherethe number of ratings is greater than 10,000.SELECT distinct r.`rating`, count(distinct r.`movieid`) as "NumOFMovies"FROM ratings rgroup by r.ratinghaving count(r.movieid) > 10000;Can any one help? |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2008-11-24 : 19:25:06
|
does this work?SELECT r.rating, count(distinct r.movieid) as "NumOFMovies"FROM ratings rgroup by r.ratinghaving count(distinct r.movieid) > 10000; |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-11-24 : 22:57:46
|
| also dont use '' for column names. |
 |
|
|
|
|
|