Changes between Version 2 and Version 3 of AdvancedReports


Ignore:
Timestamp:
01/11/23 00:01:25 (23 months ago)
Author:
201100
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AdvancedReports

    v2 v3  
    3636}}}
    3737
     38
    3839== Вкупен број на организирани турнири, играчи и медали
    3940
     
    6364
    6465
     66== Најиграни квизови
    6567
    6668
     69{{{
     70select   q.quizname,
     71         count(a.attemptid)
     72from quiz q
     73join attempt a on q.quizid=a.quizid
     74where a.attemptdate between now() - interval '2 years' and now()
     75group by 1
     76order by count(a.attemptid)
     77
     78}}}
     79
     80
     81== Просечни поени по квиз
     82
     83
     84{{{
     85select qt.userid, q.quizname, avg(rt.points) from quiztaker qt
     86left join attempt a on qt.userid= a.userid
     87left join quiz q on q.quizid=a.quizid
     88left join result_table rt  on a.attemptid=rt.attemptid
     89group by 1, 2;
     90}}}
     91
     92
     93== Вкупен број решени квизови во последните 3 месеци
     94
     95
     96{{{
     97select count(qu.quizid) as broj_resheni_kvizovi
     98from quiz qu
     99join attempt at on qu.quizid = at.quizid
     100join quizTaker qt on at.userid  = qt.userid
     101and at.attemptdate between now() - interval '3 months' and now()
     102}}}
     103
     104