Question: The company in order to like to determine The maximum ticket income for each movie in The company showing days. Using SQL, write a query to dojo.provide this information.
O great god answer
CodePudding user response:
Pictures can't open, you put the figure them directly hereCodePudding user response:
I'm sorry I have a question, I don't know why can't directly to postCodePudding user response:
For me, this is actually two questions,English is my forever of pain,
Select Date, Movieid, Filmname
, the Sum ((Case When Wsa='y' Then Seat + 1 Else Seat End) * Price) Income_Total
The From Movie
Group By Date, Movieid, Filmname
CodePudding user response:
It wsa a capital 'y' behind the 'y'As long as you don't like the train in China, I, should be right,
CodePudding user response:
Upstairs in the punchlineCodePudding user response:
Select the Date, Movieid, Filmname, MAX (Sum ((Case When Wsa='y' Then Seat + 1 Else Seat End) * Price)) MAX
The From Movie
Group By Date, Moviename