diff --git a/posthog/warehouse/models/join.py b/posthog/warehouse/models/join.py index b24d6916e93c9..3eda8275c0337 100644 --- a/posthog/warehouse/models/join.py +++ b/posthog/warehouse/models/join.py @@ -128,6 +128,11 @@ def _join_function_for_experiments( }.items() ], select_from=ast.JoinExpr(table=ast.Field(chain=["events"])), + where=ast.CompareOperation( + op=ast.CompareOperationOp.Eq, + left=ast.Field(chain=["event"]), + right=ast.Constant(value="$feature_flag_called"), + ), ), # ASOF JOIN finds the most recent matching event that occurred at or before each data warehouse timestamp. #