0

Problem description

I'm trying to get the information of how many active users I have in my app separated by the 2 or 3 latest versions of the app.

I've read some documentations and other stack questions but none of them was solving my problem (and some others had outdated solutions).

Examples of solutions I tried:

So, I started to write the solution out of my head, and this is what I get so far:

SELECT 
  user_pseudo_id,
  app_info.version,
  ROUND(COUNT(DISTINCT user_pseudo_id) OVER (PARTITION BY app_info.version) / SUM(COUNT(DISTINCT user_pseudo_id)) OVER (), 3) AS adoption
FROM `projet-table.events_*`
WHERE platform = 'ANDROID'
GROUP BY app_info.version, user_pseudo_id
ORDER BY app_info.version

screenshot of code and results of my query

Conclusions

  • I'm not sure if my logic is correct, but I think I can use user_pseudo_id to calculate it, right? The general idea is: user_of_X_version/users_of_all_versions. (And the results are kinda close to the ones showing at Google Analytics web platform - I believe the difference is due to the date that I turned on the BigQuery integration. But.... I'd like some confirmation on that: if my logic is correct).
  • The biggest problem in my code now is that I cannot write it without grouping by user_pseudo_id (Because when I don't BigQuery says: "SELECT list expression references column user_pseudo_id which is neither grouped nor aggregated at [2:3]") and that's why I have duplicated rows in the query result
  • Also, about the first link of examples... Is there any possibility of a record with engagement_time_msec param with value < 0? If not, why is that condition in the where clause?
Thur Brum
  • 53
  • 1
  • 8
  • 1
    Hi Thur did you ever end up getting the result you were looking for? – brianangulo Dec 03 '22 at 00:20
  • Actually I didn't get all the answers, but got quite close results to the ones shown in Google Analytics platform. I have crash-free values and adoption split by version. (sorry for the delay on answering, I'll share my query as soon as I get home tonight) – Thur Brum Dec 27 '22 at 21:08

0 Answers0