Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT install_day,
- SUM(sum_usd)
- FROM
- (SELECT attribute_profile_id profile_id,
- MIN(segment_date) AS install_day
- FROM marketing_installs_dist FINAL
- WHERE profile_id <> ''
- GROUP BY profile_id
- HAVING install_day = '2020-03-29') ANY
- LEFT JOIN
- (SELECT profile_id,
- SUM(price_usd) AS sum_usd
- FROM purchases_dist
- WHERE DAY >= '2020-03-29'
- GROUP BY profile_id) USING profile_id
- GROUP BY install_day
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement