Changes between Version 2 and Version 3 of AdvancedReports


Ignore:
Timestamp:
01/18/22 22:10:41 (3 years ago)
Author:
193270
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AdvancedReports

    v2 v3  
    1313fetch first row only;
    1414}}}
     15
     16== Прикажување на членот што има прочитано највеќе книги во последниот месец
     17{{{
     18select ch.ime,ch.prezime,(count(ch.id_chovek)) as pozajmuvanja
     19from pozajmica as p
     20join chlen as chl on p.id_chovek_prave = chl.id_chovek
     21join chovek as ch on chl.id_chovek = ch.id_chovek
     22join knigi as k on p.id_na_kniga = k.id_na_kniga
     23where p.datum_na_zemanje between now() - interval'1 month' and now()
     24group by 1,2
     25order by pozajmuvanja desc
     26fetch first row only;
     27}}}