Versionen im Vergleich

Schlüssel

  • Diese Zeile wurde hinzugefügt.
  • Diese Zeile wurde entfernt.
  • Formatierung wurde geändert.

---------------------------------------------------------------------------

select name, durationinsec

from title

where durationinsec >

(select avg(durationinsec)

from title);



---------------------------------------------------------------------------select

name,

durationinsec,

  (select avg(durationinsec) from title) as average,

  durationinsec -  (select avg(durationinsec) from title) as diff

from title;



---------------------------------------------------------------------------

select vpl.plid, name as title, avg_pl, durationinsec, durationinsec-avg_pl as diff

from title t

     join

  (select plid, avg(durationinsec) as avg_pl

   from title

   group by plid) vpl

 on t.plid=vpl.plid

order by t.plid;



---------------------------------------------------------------------------

...