Changes between Version 23 and Version 24 of AdvancedReports


Ignore:
Timestamp:
12/23/22 21:15:12 (2 years ago)
Author:
191285
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AdvancedReports

    v23 v24  
    100100{{{#!div style="font-size: 90%"
    101101  {{{#!sql
    102 select count (*) from (
    103 with tempTable as (select
    104         o.*
    105 from organizers o
    106 join reviews as r on
    107        r.organizer_id = o.user_id and
    108        r.rating > 3
    109 group by o.user_id)
    110 select
    111         t.*
    112 from events as e
    113 join tempTable as tt on
    114        tt.user_id = e.organizer_id
    115 join offers as o2 on
    116        o2.event_id = e.id
    117 join transactions as t on
    118      t.offer_id = o2.id
    119 ) as temp
     102select c.id_user, r.rating, count(t.id_transaction)
     103from customer c join review r on c.id_user =r.id_user_customer
     104join cart c2 on c.id_user =c2.id_user_customer
     105join transactions t on c2.id_user_customer =t.id_user_customer
     106where r.rating >7
     107group by c.id_user, r.rating
    120108  }}}
    121109}}}