You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CohortMe.analyze(period: 'months', activation_class: Transfer.unscoped) results in this query
SELECT DISTINCT transfers.user_id, transfers.created_at, cohort_date, FLOOR(extract(epoch from (transfers.created_at - cohort_date))/2592000) as periods_out FROM "transfers" JOIN (SELECT transfers.user_id, MIN(transfers.created_at) as cohort_date FROM "transfers" WHERE (created_at > '2014-04-18 11:31:53.062696') GROUP BY "transfers"."user_id") AS cohorts ON transfers.user_id = cohorts.user_id WHERE (created_at > '2014-04-18 11:31:53.062696')
If I make couple of transfers as a user in a cohort, then the count will increase by the number of transfers (activations) instead of just 1. That is, starting with this [2, 0, 0, 0, 0, 0, 0, 0, 0, 0] and then after multiple transfer by the same user results in [2, 0, 0, 0, 0, 0, 0, 0, 2, 0] instead of [2, 0, 0, 0, 0, 0, 0, 0, 1, 0].
I'm using Rails 4.2.1 and Postgresql 9.4.1. Please advice!
The text was updated successfully, but these errors were encountered:
CohortMe.analyze(period: 'months', activation_class: Transfer.unscoped)
results in this queryIf I make couple of transfers as a user in a cohort, then the count will increase by the number of transfers (activations) instead of just 1. That is, starting with this
[2, 0, 0, 0, 0, 0, 0, 0, 0, 0]
and then after multiple transfer by the same user results in[2, 0, 0, 0, 0, 0, 0, 0, 2, 0]
instead of[2, 0, 0, 0, 0, 0, 0, 0, 1, 0]
.I'm using Rails 4.2.1 and Postgresql 9.4.1. Please advice!
The text was updated successfully, but these errors were encountered: