https://www.growthbook.io/ logo
p

prehistoric-oxygen-56976

07/25/2023, 8:28 AM
Hi! Been running a couple of experiments now and loving the product so far. However, I've had to create new segments for each of the experiment where I only want to include the user's that have signed up after the experiment has gone live. I'm wondering if there's a better way for me to filter the users based on the experiment start-date, instead of adding a new segment manually each time? 🤔
b

billions-xylophone-11752

07/25/2023, 10:44 AM
Hey, Axel! GrowthBook does support SQL Template Variables, so you can build a query with placeholder variables that will be replaced with strings before being run, based on the experiment. https://docs.growthbook.io/app/datasources#sql-template-variables
So your where clause could look something like
Copy code
WHERE merchants.shop_creation_date >= '{{ startDate}}'
p

prehistoric-oxygen-56976

07/25/2023, 11:04 AM
awesome, had missed that! thanks for your help!
f

fresh-football-47124

07/26/2023, 4:25 PM
the experiment assignment query will automatically use the date range for the experiment