Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save liangway/b0442529a840a0cdf245c85985d21311 to your computer and use it in GitHub Desktop.
Save liangway/b0442529a840a0cdf245c85985d21311 to your computer and use it in GitHub Desktop.
SELECT
Flight.FlightNumber,
(SELECT SUM(Passenger.BaggageWeight)
FROM Flight
INNER JOIN Passenger ON Flight.id = Passenger.FlightId )
FROM Flight
GROUP BY Flight.id;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment