Changes between Version 19 and Version 20 of AdvancedReports


Ignore:
Timestamp:
03/10/22 18:54:09 (3 years ago)
Author:
191151
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AdvancedReports

    v19 v20  
    269269
    270270{{{#!sql
    271 -- Status 1 - vo dogovor
    272 -- Status 2 - dogovoreni
    273 -- Status 3 - otkazano
    274 
    275271with tempTable as (select
    276         oc.offer_id,
    277         count(oc.offer_id) as num_of_comments
     272        oc.offer_id,
     273        count(oc.offer_id) as num_of_comments
    278274from offer_comments oc
    279275join offers as o on o.id = oc.offer_id and
    280                                         o.status = 2
     276        o.status = 'COMPLETED'
    281277group by oc.offer_id)
    282278select
    283         avg(t.num_of_comments)
     279        avg(t.num_of_comments)
    284280from tempTable as t
    285281}}}