title: SQL statement with group by - list of passengers
body: <p>with the following statement I am trying to select the list of passengers with their total weight of luggage. I keep receiving this error ORA-00979: not a GROUP BY expression [SQL State=42000, DB Errorcode=979]. If I add all the expressions in the select clause, I get rid of the error, however the statement lists passengers multiple times if they have more than just one item of luggage.</p>
  
  <p>Any idea how to fix it? Thank you.</p>
  
  <pre><code>select f.flugnummer, p.nachname, pl.sitzplatznummer, l.bezeichnung, r.reisepassnr, sum(g.gewicht) as Luggage
  from passagierliste pl join flug f on f.flugID = pl.flugID
      join gepaeck g on pl.personID = g.personID
      join person p on pl.personID = p.personID
      join reisepass r on p.personID = r.personID
      join land l on r.landID = l.landID
      group by nachname;
  </code></pre>