Changes between Version 5 and Version 6 of AdvancedReports


Ignore:
Timestamp:
01/18/22 23:15:18 (3 years ago)
Author:
193270
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AdvancedReports

    v5 v6  
    4444and p.datum_na_zemanje between now() - interval'3 weeks' and now()
    4545}}}
     46
     47== Прикажување на најдобро оценетата книга во даден временски интервал
     48{{{
     49select k.naslov, avg(ocena) as prosecna_ocena from ocena as o
     50
     51join knigi as k on o.ocena_id_kniga = k.id_na_kniga
     52join pozajmica as p on k.id_na_kniga = p.id_na_kniga
     53
     54where p.datum_na_vrakjanje between now() - interval '2 weeks' and now()
     55group by 1
     56order by prosecna_ocena desc
     57fetch first row only;
     58}}}