This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
shopify_clv_attribution [2021/09/06 15:47] windsor_ai created |
shopify_clv_attribution [2021/09/29 14:46] (current) windsor_ai |
||
---|---|---|---|
Line 7: | Line 7: | ||
- shopify_orders \\ Connector URL: < | - shopify_orders \\ Connector URL: < | ||
- shopify_customers \\ Connector URL: < | - shopify_customers \\ Connector URL: < | ||
- | - Head to [[https:// | + | - Head to [[https:// |
+ | TRUNCATE TABLE crm_conversions; | ||
INSERT INTO crm_conversions(net_revenue, | INSERT INTO crm_conversions(net_revenue, | ||
- | SELECT | + | SELECT |
- | sum(customers.customer_total_spent:: | + | sum(customers.customer_total_spent:: |
- | orders.order_name as transaction_id, | + | REPLACE(orders.order_name,'#','' |
- | ' | + | ' |
- | FROM shopify_customers | + | FROM shopify_customers |
- | LEFT JOIN shopify_orders | + | LEFT JOIN shopify_orders |
- | GROUP BY 2;</ | + | GROUP BY 2,3; |
+ | COMMIT;</ |