题目:http://upload.lsforum.net/users/public/j5254635746543h67.png
问题: The company would like to determine the maximum ticket income for each movie in different showing days.Using SQL, write a query to provide this information.求大神回答
问题: The company would like to determine the maximum ticket income for each movie in different showing days.Using SQL, write a query to provide this information.求大神回答
英语是我永远的痛。
Select Date,Movieid,Filmname
,Sum((Case When Wsa='y' Then Seat+1 Else Seat End)*Price) Income_Total
From Movie
Group By Date,Movieid,Filmname
只要不像中国的火车一样,卖站票,应该就是对的。
,MAX(Sum((Case When Wsa='y' Then Seat+1 Else Seat End)*Price) ) max
From Movie
Group By Date,Moviename