Hey Guys
I have to answer the following question "For each year in the database, list the year and the total number of movies that were released in that year, showing these totals in decreasing order. That is, the year(s) with the largest number of movies appear first. If some years have the same number of movies, show these in increasing order of year." currently i am using the code bellow to get the movies to group but am unable to get them to order.
Select YearReleased, count(*)
from Movies
group by YearReleased
I wish to use a to order this i am trying to make a sub query that uses the results of the first query, along the lines of;
(select * from results order by count(*))
But have been unsuccessful, so how do i achieve this or is there a better way of getting the results to order.
Thanks in advance.