Advertisement
kirzecy670

child_id_per_parent

Sep 10th, 2024
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. SELECT
  2. uid,
  3. count(*) AS children_id,
  4. countIf(json_data.3 = 'approved') AS children_id_approved
  5. FROM
  6. analytics.parent_properties
  7. ARRAY JOIN
  8. children AS json_data
  9. WHERE last_active_datetime >= today() - interval '7' day
  10. and is_full_register
  11. GROUP BY 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement