Changes between Version 11 and Version 12 of Напредни извештаи од базата


Ignore:
Timestamp:
02/12/22 00:50:01 (3 years ago)
Author:
186102
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Напредни извештаи од базата

    v11 v12  
    3434from project.product as p
    3535join(
    36         select ptw.prod_id, count(ptw.prod_id) as cnt
    37         from project.product_to_wishlist as ptw
    38         group by ptw.prod_id
     36        select ptw.prod_id, count(ptw.prod_id) as cnt
     37        from project.product_to_wishlist as ptw
     38        group by ptw.prod_id
    3939) as pw on p.prod_id = pw.prod_id
    40 group by p."name", p.description, pw.cnt
     40join(
     41                select u.time_stamp, u.product_id
     42                from project.updates as u
     43                group by u.product_id, u.time_stamp
     44)as u on u.product_id = p.prod_id
     45where now()-interval'6 months' <= u.time_stamp
     46group by p."name", p.description, pw.cnt, p.prod_id, u.time_stamp
    4147order by pw.cnt desc
    4248limit 1;