Advertisement
Guest User

Untitled

a guest
Nov 13th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. select variant_name, count(id_for_vendor) as total_sent, count(SubID) as total_sent,
  2. (cast(count(SubID) as float))/(cast(count(id_for_vendor) as float)) as RetentionRatio
  3. From
  4. (select a.*,Sub.id_for_vendor as SubID,Sub.device_timestamp
  5. from public.Facetune2_usage_ab_test_info_all as A left join
  6. public.Facetune2_usage_store_user_subscribed as Sub
  7. on (a.id_for_vendor=Sub.id_for_vendor and a.device_timestamp < Sub.device_timestamp)) as Y
  8. group by variant_name
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement