Changes between Version 17 and Version 18 of AdvancedReports


Ignore:
Timestamp:
12/28/21 20:58:29 (2 years ago)
Author:
193181
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AdvancedReports

    v17 v18  
    8080
    8181
    82 == Прикажување на жанрот кој бил најпопуларен според бројот на дискусии и реплики поврзани за филмови од тој жанр врз основа на дискусии и реплики кои биле поставени во претходните 2 недели.
     82== Прикажување на Трите најпопуларни жанрови според бројот на дискусии и реплики поврзани за филмови од тој даден жанр, земајќи ги во предвид само оние дискусии и реплики кои биле поставени пред најмногу 2 недели.
    8383{{{
    8484 select g.genre_type,
    85         count(distinct d) + count(distinct r) as discussions_replies_count
     85        count(distinct d) + count(distinct r) as discussions_replies_count
    8686 from genres g
    87         join movie_genres mg on mg.genre_id = g.genre_id
    88         join movies m on m.movie_id = mg.movie_id
    89         join discussions d on d.movie_id = m.movie_id and d.date between current_date - interval '14 days' and current_date
    90         left join replies r on r.discussion_id = d.discussion_id and r.date between current_date - interval '14 days' and current_date
     87        join movie_genres mg on mg.genre_id = g.genre_id
     88        join movies m on m.movie_id = mg.movie_id
     89        join discussions d on d.movie_id = m.movie_id
     90                and d.date between current_date - interval '14 days' and current_date
     91        left join replies r on r.discussion_id = d.discussion_id
     92                and r.date between current_date - interval '14 days' and current_date
    9193 group by g.genre_id
    9294 order by count(distinct d) + count(distinct r) desc
    93  limit 1
     95 limit 3;
    9496}}}
    9597
     
    98100{{{
    99101 
    100  select distinct mov.title, table2.gnr as genre, mov.description, extract(year from mov.airing_date) as released_year, mov.imdb_rating
     102 select mov.title, table2.gnr as genre, mov.description, extract(year from mov.airing_date) as released_year, mov.imdb_rating
    101103                from (
    102104                select  u.user_id,