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-23 : 12:33:42
|
When I insert decs in to this statement it throws an error. What am I doing wrong?SELECT m.title,count(r.rating) as NumofRatingsFROM movies minner join ratings ron m.movieid = r.movieidgroup by r.ratinghaving count(r.rating) >25 desc; |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-11-23 : 12:37:33
|
| [code]SELECT m.title,count(r.rating) as NumofRatingsFROM movies minner join ratings ron m.movieid = r.movieidgroup by r.ratinghaving count(r.rating) >25 order by NumofRatings desc[/code] |
 |
|
|
jgonzalez14
Yak Posting Veteran
73 Posts |
Posted - 2008-11-23 : 12:39:11
|
| That works!! |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-11-23 : 12:46:57
|
yup...desc/asc option should be given with order by not with having |
 |
|
|
|
|
|