You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
select DATE_TRUNC('month',created_at) _month, sum(total_price_usd) as row_sum, sum(row_sum) OVER (PARTITION by 1order by _month rows unbounded preceding) as row_num
fromshopify.orders
where customer__id in (
-- all customer id's from Q1 2017 for new customers
select customer__id
fromshopify.orders
where _mt_account_id =1
group by1havingmin(created_at) between '2016-01-01'and'2016-03-31'
)
and _mt_account_id =1
and created_at between '2016-01-01'and'2018-01-01'