question

tidentaldram avatar image
tidentaldram asked

Grouping event timestamp

Warning: I am a beginner. I want to group event_timestamp so I can see distinct actions rolled up on a daily basis. How do I do this? This is the query I wrote, but it's not really pulling back what I want. SELECT v.user_profile_sk, COUNT (distinct v.event_timestamp), v.init_source, v.previous_event_id, v.current_event_id, v.source, a.previous_event_id, a.current_event_id FROM prod_dwh_event as v LEFT OUTER JOIN prod_dwh_event_action as a on v.user_profile_sk=a.user_profile_sk WHERE v.event_timestamp >= '2015-06-22' AND init_source in ('nsloe','bsremail','promo40','digest_promo','iosemail','androidemail','sitterhelpdoc') GROUP BY v.user_profile_sk, v.init_source, v.previous_event_id, v.current_event_id, v.source, a.previous_event_id, a.current_event_id ORDER BY v.event_timestamp ASC
group-bycountgrouping
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ThomasRushton avatar image ThomasRushton ♦♦ commented ·
Perhaps you might be able to share some sample data and the output you expect? This might help us guide you towards the correct solution.
0 Likes 0 ·

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.