i have a relation
Movie(title,year,length,filmtype,incolor,studionam e,producer)
Now i want to write a SQL query that shows me only the name of the studio
that has produced most movies in year 2006.
How can i do that using SQL query?
Printable View
i have a relation
Movie(title,year,length,filmtype,incolor,studionam e,producer)
Now i want to write a SQL query that shows me only the name of the studio
that has produced most movies in year 2006.
How can i do that using SQL query?
Try something like:
select top 1 count(title) most from movie where year = 2006 group by studioname order by most desc
try this:
select temp.studioname ,max(temp.mvcount) from (select studioname,count(title) as mvcount from movie where year = 2006 groupby studioname) temp;