It seems the events table is split by date in Goog...
# ask-questions
It seems the events table is split by date in Google, then how can I calculate a date range in GB?
GrowthBook handles this for you with some fancy logic - if you look at the default queries for GA4, you'll see something like:
Copy code
  UNNEST(event_params) AS experiment_id_param,
  UNNEST(event_params) AS variation_id_param
  ((_TABLE_SUFFIX BETWEEN '{{date startDateISO "yyyyMMdd"}}' AND '{{date endDateISO "yyyyMMdd"}}') OR
   (_TABLE_SUFFIX BETWEEN 'intraday_{{date startDateISO "yyyyMMdd"}}' AND 'intraday_{{date endDateISO "yyyyMMdd"}}'))
  AND event_name = 'experiment_viewed'  
  AND experiment_id_param.key = 'experiment_id'
  AND variation_id_param.key = 'variation_id'
  AND user_pseudo_id is not null
I need this group aggregator to calculate 14 days signup rate, but in GB it requires timestamp and user_id for each query. How can I make it?
the query needs to return a timestamp
but that timestamp can be based on anything you like
so you should return the event_date - the where clause will remove invalid rows - we have template variables you can use in the queries for the dates: