=======================================
Flight SeatType Price GrandTotal
=======================================
F36712 Business $480
Economy $375
First $450 ?
F12314 Business $100
Economy $200
First $300 ?
我试过这个 SQL:
$sql = "SELECT FlightID,SeatType, sum(SeatPrice)Total
FROM seat
WHERE SeatAvailable = 'Yes'
GROUP BY FlightID,SeatType, SeatPrice";
我可以知道如何计算总计(每个航班的商务舱、经济舱和头等舱的总和)吗?