Hey all I created a basic segment from a fact tabl...
# ask-questions
c
Hey all I created a basic segment from a fact table filter, called Mobile users. When I try to add this segment to an experiment analysis, the generated query is invalid since it adds a
WHERE
where there should be an
AND
When I add the same logic in a Custom SQL Filter, it works fine. I want to use segments instead so it can be reproduced and added by users who don't know SQL.
Example genereate query:
Copy code
-- Metric (mean)
WITH
  __rawExperiment AS (
     --- logic
  ),
  __experimentExposures AS (
     --- logic
  ),
  __segment as ( -- Segment (Mobile users)
    SELECT
      *
    FROM
      (
        -- Fact Table
        SELECT
          --- logic
        FROM
          (
            SELECT
               --- logic
            FROM
              --- logic
            WHERE
              timestamp BETWEEN DATE('2024-11-07 13:09:00') AND DATE('2024-12-15 12:28:00')
              AND experiment_name LIKE --- exp name
            WHERE
              device = "Mobile"
          ) m
      ) s
  ),
  __experimentUnits AS (
     --- logic
  ),
---
f
Interesting
would you mind opening an issue in Github for this?