Date Flight ID Member ID Seat Type Seat Price
2013-07-28 F71498 M69202 Business RM 40.00
F73591 M69202 First RM 50.00
M69202 First RM 50.00
F71498 M37520 Business RM 40.00
M69202 Business RM 40.00
===============
Total : ??
===============
我试过下面的 SQL
SELECT
r.ReservationDate, r.FlightID, r.MemberID, s.SeatType, s.SeatPrice
FROM
flight f, reservation r, seat s, member m
WHERE
r.FlightID = f.FlightID
AND r.SeatID = s.SeatID
AND r.MemberID = m.MemberID
AND ReservationDate = '2013-07-28'
AND s.FlightID = f.FlightID
我可以按应有的方式生成上面的报告,但我需要帮助汇总总数SeatPrice
.. 我可以知道如何计算总数吗?谢谢先进...=)