Finding the decade with largest records, SQL Server

前端 未结 4 1007
我寻月下人不归
我寻月下人不归 2021-01-06 17:13

I have the following db diagram :

I want to find the decade (for example 1990 to 2000) that has the most number of movies. Actually it only deals with "

4条回答
  •  既然无缘
    2021-01-06 17:48

       SELECT floor(Year(getdate())/10)*10
            , floor(year('5/11/2004')/10)*10
            , floor(Year('7/23/1689')/10)*10
            , floor(Year('7/09/1989')/10)*10
    

提交回复
热议问题