Changes between Version 15 and Version 16 of AdvancedReports


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

--

Legend:

Unmodified
Added
Removed
Modified
  • AdvancedReports

    v15 v16  
    55{{{#!sql
    66select
    7         o.artist_id,
     7        u."name" ,
    88        SUM(t.stripe_price)
    9 from transactions t
    10 inner join offers o on
    11                 t.offer_id = o.id
     9from artists a
     10join users u on
     11        u.id = a.user_id
     12join offers o on
     13    o.artist_id = u.id
     14join transactions t on
     15        t.offer_id = o.id
    1216where
    13         extract (year from t.created_at) = extract (year from now() - interval '1 year')
    14 group by o.artist_id
     17    extract (year from t.created_at) = extract (year from now() - interval '1 year')
     18group by u.id
    1519}}}
    1620