Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- t.seller_user_id AS seller_id,
- us.creation_tsz AS signup_date,
- SUM(t.price*t.quantity) as GMS,
- subpath(t.tags, 0, 1) AS category
- FROM
- etsy_v2.transactions t JOIN
- etsy_v2.users_seller us ON t.seller_user_id=us.user_seller_id
- WHERE
- EXTRACT(YEAR FROM us.creation_tsz = '2008' AND
- EXTRACT(MONTH FROM us.creation_tsz) = '05' AND
- t.creation_tsz >= '2010-05-01' AND t.creation_tsz < '2010-05-31' AND
- t.tags ~ 'jewelry.*'
- GROUP BY 1
- ORDER BY GMS DESC, signup_date, category
- ;
Advertisement
Add Comment
Please, Sign In to add comment