{
  "version": 11,
  "revision": "prospective-v11-r2",
  "as_of_date": "2026-09-06",
  "timezone": "Europe/London",
  "cases": [
    {
      "case_id": "independent11:marketing_registration_gap:first-count",
      "intent_family": "independent11:marketing_registration_gap",
      "split": "locked_holdout",
      "category": "source_measure",
      "supported": true,
      "connection": "ct",
      "nl_query": "How many distinct ordinary CT user accounts opted in to marketing emails whose registration is still incomplete are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.clients c ON c.user_id=a.id JOIN public.notification_settings ns ON ns.account_credentials_id=a.credentials_id WHERE a.role='User' AND ns.marketing_emails_enabled IS TRUE AND c.completed_registration_at IS NULL) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:verified_after_registration:first-count",
      "intent_family": "independent11:verified_after_registration",
      "split": "locked_holdout",
      "category": "source_measure",
      "supported": true,
      "connection": "ct",
      "nl_query": "How many distinct CT accounts of any role whose earliest verified broker account date is after their completed registration date are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT c.user_id AS user_id FROM public.clients c WHERE c.completed_registration_at IS NOT NULL AND (SELECT MIN(ba.verified_at) FROM public.broker_accounts ba WHERE ba.user_id=c.user_id)>c.completed_registration_at) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:notified_without_verification:first-count",
      "intent_family": "independent11:notified_without_verification",
      "split": "locked_holdout",
      "category": "source_measure",
      "supported": true,
      "connection": "ct",
      "nl_query": "How many distinct CT accounts of any role with a notified broker account but no broker account that has ever been verified are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE EXISTS(SELECT 1 FROM public.broker_accounts ba WHERE ba.user_id=a.id AND ba.notified_at IS NOT NULL) AND NOT EXISTS(SELECT 1 FROM public.broker_accounts bx WHERE bx.user_id=a.id AND bx.verified_at IS NOT NULL)) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:outdated_still_activated:first-count",
      "intent_family": "independent11:outdated_still_activated",
      "split": "locked_holdout",
      "category": "source_measure",
      "supported": true,
      "connection": "ct",
      "nl_query": "How many distinct CT accounts of any role with a previously verified broker account now marked outdated are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT ba.user_id AS user_id FROM public.broker_accounts ba WHERE ba.status='outdated' AND ba.verified_at IS NOT NULL) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:multi_broker_activation:first-count",
      "intent_family": "independent11:multi_broker_activation",
      "split": "locked_holdout",
      "category": "source_measure",
      "supported": true,
      "connection": "ct",
      "nl_query": "How many distinct CT accounts of any role that have at least two different verified brokers are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT ba.user_id AS user_id FROM public.broker_accounts ba WHERE ba.user_id IN (SELECT user_id FROM public.broker_accounts WHERE verified_at IS NOT NULL GROUP BY user_id HAVING COUNT(DISTINCT broker_id)>=2)) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:private_declared_currency_overlap:first-count",
      "intent_family": "independent11:private_declared_currency_overlap",
      "split": "locked_holdout",
      "category": "source_measure",
      "supported": true,
      "connection": "ct",
      "nl_query": "How many distinct private CT client records who declared at least one currency on both the sell and buy sides are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT c.user_id AS user_id FROM public.clients c WHERE c.type='PersonalAccount' AND c.sell_currencies && c.buy_currencies) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:corporate_registration_without_trade:first-count",
      "intent_family": "independent11:corporate_registration_without_trade",
      "split": "locked_holdout",
      "category": "source_measure",
      "supported": true,
      "connection": "ct",
      "nl_query": "How many distinct corporate CT client records with completed registration who have no non-deleted, non-closed booking are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT c.user_id AS user_id FROM public.clients c WHERE c.type IS NOT NULL AND c.type<>'PersonalAccount' AND c.completed_registration_at IS NOT NULL AND NOT EXISTS(SELECT 1 FROM public.trade_bookings tb WHERE tb.user_id=c.user_id AND tb.status<>'closed' AND tb.deleted_at IS NULL)) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:unknown_sti_with_broker:first-count",
      "intent_family": "independent11:unknown_sti_with_broker",
      "split": "locked_holdout",
      "category": "source_measure",
      "supported": true,
      "connection": "ct",
      "nl_query": "How many distinct CT client records whose client type is unknown and who have at least one broker account are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT c.user_id AS user_id FROM public.clients c WHERE c.type IS NULL AND EXISTS(SELECT 1 FROM public.broker_accounts ba WHERE ba.user_id=c.user_id)) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:quote_only_system_activity:first-count",
      "intent_family": "independent11:quote_only_system_activity",
      "split": "locked_holdout",
      "category": "source_measure",
      "supported": true,
      "connection": "ct",
      "nl_query": "How many distinct CT accounts of any role that have system-generated quotes and no user-requested quote are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE EXISTS(SELECT 1 FROM public.quotes q WHERE q.user_id=a.id AND q.type<>'by_client') AND NOT EXISTS(SELECT 1 FROM public.quotes q WHERE q.user_id=a.id AND q.type='by_client')) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:quote_conversion_valid_link:first-count",
      "intent_family": "independent11:quote_conversion_valid_link",
      "split": "locked_holdout",
      "category": "source_measure",
      "supported": true,
      "connection": "ct",
      "nl_query": "How many distinct CT accounts of any role whose own quote converted to a non-deleted, non-closed booking through the quote ID link are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT q.user_id AS user_id FROM public.quotes q JOIN public.trade_bookings tb ON tb.quote_id=q.id WHERE q.type='by_client' AND tb.deleted_at IS NULL AND tb.status<>'closed') cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:quote_days_before_activation:first-count",
      "intent_family": "independent11:quote_days_before_activation",
      "split": "locked_holdout",
      "category": "source_measure",
      "supported": true,
      "connection": "ct",
      "nl_query": "How many distinct CT accounts of any role whose user-requested quote predates their earliest known broker verification timestamp are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT q.user_id AS user_id FROM public.quotes q WHERE q.type='by_client' AND q.created_at<(SELECT MIN(ba.verified_at) FROM public.broker_accounts ba WHERE ba.user_id=q.user_id)) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:booked_without_settled_history:first-count",
      "intent_family": "independent11:booked_without_settled_history",
      "split": "locked_holdout",
      "category": "source_measure",
      "supported": true,
      "connection": "ct",
      "nl_query": "How many distinct CT accounts of any role with a non-deleted booking but no settled booking are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE EXISTS(SELECT 1 FROM public.trade_bookings tb WHERE tb.user_id=a.id AND tb.status<>'closed' AND tb.deleted_at IS NULL) AND NOT EXISTS(SELECT 1 FROM public.trade_bookings tb WHERE tb.user_id=a.id AND tb.status='settled')) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:invoice_before_settlement:first-count",
      "intent_family": "independent11:invoice_before_settlement",
      "split": "locked_holdout",
      "category": "source_measure",
      "supported": true,
      "connection": "ct",
      "nl_query": "How many distinct CT accounts of any role with an invoiced booking record that is neither closed nor settled, including records marked deleted are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT tb.user_id AS user_id FROM public.trade_bookings tb WHERE tb.status<>'closed' AND tb.status<>'settled' AND tb.invoice_at IS NOT NULL) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:prebillable_eligible_stats:first-count",
      "intent_family": "independent11:prebillable_eligible_stats",
      "split": "locked_holdout",
      "category": "source_measure",
      "supported": true,
      "connection": "ct",
      "nl_query": "How many distinct CT accounts of any role with pre-billable bookings that qualify for the CT statistics filters are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.trade_bookings tb ON tb.user_id=a.id WHERE tb.status<>'closed' AND tb.traded_at IS NOT NULL AND tb.invoice_at IS NULL AND a.skip_commission_calculations IS NOT TRUE AND tb.sell_currency_to_gbp_rate IS NOT NULL) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:deleted_booking_live_account:first-count",
      "intent_family": "independent11:deleted_booking_live_account",
      "split": "locked_holdout",
      "category": "source_measure",
      "supported": true,
      "connection": "ct",
      "nl_query": "How many distinct CT accounts of any role whose account is not deleted but who have a deleted booking are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.trade_bookings tb ON tb.user_id=a.id WHERE a.deleted_at IS NULL AND tb.deleted_at IS NOT NULL) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:fx_missing_on_settled:first-count",
      "intent_family": "independent11:fx_missing_on_settled",
      "split": "locked_holdout",
      "category": "source_measure",
      "supported": true,
      "connection": "ct",
      "nl_query": "How many distinct CT accounts of any role with a settled booking that has no sell-currency-to-GBP rate are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT tb.user_id AS user_id FROM public.trade_bookings tb WHERE tb.status='settled' AND tb.sell_currency_to_gbp_rate IS NULL) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:negative_realized_commission:first-count",
      "intent_family": "independent11:negative_realized_commission",
      "split": "locked_holdout",
      "category": "source_measure",
      "supported": true,
      "connection": "ct",
      "nl_query": "How many distinct CT accounts of any role whose sum of known realized commission is negative are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE a.id IN (SELECT tb.user_id FROM public.trade_bookings tb JOIN public.trade_details td ON td.trade_booking_id=tb.id WHERE tb.status='settled' GROUP BY tb.user_id HAVING SUM(td.commission)<0)) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:all_commission_unknown:first-count",
      "intent_family": "independent11:all_commission_unknown",
      "split": "locked_holdout",
      "category": "source_measure",
      "supported": true,
      "connection": "ct",
      "nl_query": "How many distinct CT accounts of any role with booking records, including closed and deleted records, whose commission inputs are all unknown are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT tb.user_id AS user_id FROM public.trade_bookings tb JOIN public.trade_details td ON td.trade_booking_id=tb.id WHERE tb.user_id IN(SELECT bx.user_id FROM public.trade_bookings bx JOIN public.trade_details dx ON dx.trade_booking_id=bx.id GROUP BY bx.user_id HAVING COUNT(dx.commission)=0)) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:known_zero_booked_commission:first-count",
      "intent_family": "independent11:known_zero_booked_commission",
      "split": "locked_holdout",
      "category": "source_measure",
      "supported": true,
      "connection": "ct",
      "nl_query": "How many distinct CT accounts of any role with at least one known booked commission input and a booked commission total of exactly zero are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE a.skip_commission_calculations IS NOT TRUE AND a.id IN(SELECT tb.user_id FROM public.trade_bookings tb JOIN public.trade_details td ON td.trade_booking_id=tb.id WHERE tb.status<>'closed' AND tb.sell_currency_to_gbp_rate IS NOT NULL GROUP BY tb.user_id HAVING COUNT(td.commission)>0 AND SUM(td.commission)=0)) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:deadline_actual_date_disagreement:first-count",
      "intent_family": "independent11:deadline_actual_date_disagreement",
      "split": "locked_holdout",
      "category": "source_measure",
      "supported": true,
      "connection": "ct",
      "nl_query": "How many distinct CT accounts of any role with a settled booking whose actual completion date differs from its settlement deadline date in Europe/London, treating raw timestamps as UTC are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT tb.user_id AS user_id FROM public.trade_bookings tb WHERE tb.status='settled' AND ((tb.completed_at AT TIME ZONE 'UTC') AT TIME ZONE 'Europe/London')::date<>((tb.settlement_at AT TIME ZONE 'UTC') AT TIME ZONE 'Europe/London')::date) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:london_signup_month_edge:first-count",
      "intent_family": "independent11:london_signup_month_edge",
      "split": "locked_holdout",
      "category": "source_measure",
      "supported": true,
      "connection": "ct",
      "nl_query": "How many distinct ordinary CT user accounts created during September 2026 in Europe/London, interpreting raw timestamps as UTC are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE a.role='User' AND a.created_at>=TIMESTAMP '2026-08-31 23:00:00' AND a.created_at<TIMESTAMP '2026-09-30 23:00:00') cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:first_booked_before_first_broker:first-count",
      "intent_family": "independent11:first_booked_before_first_broker",
      "split": "locked_holdout",
      "category": "source_measure",
      "supported": true,
      "connection": "ct",
      "nl_query": "How many distinct CT accounts of any role whose first non-deleted, non-closed booking predates their first broker verification are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE (SELECT MIN(tb.traded_at) FROM public.trade_bookings tb WHERE tb.user_id=a.id AND tb.status<>'closed' AND tb.deleted_at IS NULL)<(SELECT MIN(ba.verified_at) FROM public.broker_accounts ba WHERE ba.user_id=a.id)) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:professional_zero_rate_referrals:first-count",
      "intent_family": "independent11:professional_zero_rate_referrals",
      "split": "locked_holdout",
      "category": "source_measure",
      "supported": true,
      "connection": "ct",
      "nl_query": "How many distinct CT client records referred by a professional affiliate whose commission rate is zero are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.accounts ref ON ref.id=a.affiliate_id JOIN public.affiliate_details ad ON ad.affiliate_id=ref.id WHERE ref.role IN('Affiliate','AffiliateManager','Partner') AND ad.commission_rate=0) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:customer_referrals_with_reward_event:first-count",
      "intent_family": "independent11:customer_referrals_with_reward_event",
      "split": "locked_holdout",
      "category": "source_measure",
      "supported": true,
      "connection": "ct",
      "nl_query": "How many distinct CT client records referred by a customer account where that referrer has a reward event for the same client are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.accounts ref ON ref.id=a.affiliate_id WHERE ref.role='User' AND EXISTS(SELECT 1 FROM public.reward_events re WHERE re.user_id=ref.id AND re.referred_user_id=a.id)) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:partner_paid_and_unpaid_statements:first-count",
      "intent_family": "independent11:partner_paid_and_unpaid_statements",
      "split": "locked_holdout",
      "category": "source_measure",
      "supported": true,
      "connection": "ct",
      "nl_query": "How many distinct professional CT partner accounts with both paid and unpaid monthly affiliate statements are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE a.role IN('Affiliate','AffiliateManager','Partner') AND EXISTS(SELECT 1 FROM public.affiliate_commission_statements s WHERE s.affiliate_id=a.id AND s.paid_at IS NOT NULL) AND EXISTS(SELECT 1 FROM public.affiliate_commission_statements s WHERE s.affiliate_id=a.id AND s.paid_at IS NULL)) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:different_sales_ownership:first-count",
      "intent_family": "independent11:different_sales_ownership",
      "split": "locked_holdout",
      "category": "source_measure",
      "supported": true,
      "connection": "ct",
      "nl_query": "How many distinct ordinary CT user accounts whose salesperson and relationship manager are both known and are different people are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE a.role='User' AND a.salesperson_id IS NOT NULL AND a.relationship_manager_id IS NOT NULL AND a.salesperson_id<>a.relationship_manager_id) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:campaign_and_web_referral:first-count",
      "intent_family": "independent11:campaign_and_web_referral",
      "split": "locked_holdout",
      "category": "source_measure",
      "supported": true,
      "connection": "ct",
      "nl_query": "How many distinct CT accounts of any role assigned to a campaign and with a known web referral domain are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.campaigns ca ON ca.id=a.campaign_id JOIN public.user_analytics ua ON ua.user_id=a.id WHERE ua.came_from_domain IS NOT NULL AND ca.token IS NOT NULL) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:funnel_incomplete_contact:first-count",
      "intent_family": "independent11:funnel_incomplete_contact",
      "split": "locked_holdout",
      "category": "source_measure",
      "supported": true,
      "connection": "ct",
      "nl_query": "How many distinct ordinary CT user accounts with complete registration but at least one missing or blank first-name, last-name, or telephone field are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.clients c ON c.user_id=a.id WHERE a.role='User' AND c.completed_registration_at IS NOT NULL AND (a.first_name IS NULL OR a.first_name='' OR a.last_name IS NULL OR a.last_name='' OR a.telephone IS NULL OR a.telephone='')) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:trade_sell_not_declared:first-count",
      "intent_family": "independent11:trade_sell_not_declared",
      "split": "locked_holdout",
      "category": "source_measure",
      "supported": true,
      "connection": "ct",
      "nl_query": "How many distinct CT client records who booked a non-deleted, non-closed trade in a sell currency absent from their declared sell currencies are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT c.user_id AS user_id FROM public.clients c JOIN public.trade_bookings tb ON tb.user_id=c.user_id WHERE tb.status<>'closed' AND tb.deleted_at IS NULL AND c.sell_currencies IS NOT NULL AND NOT(tb.sell_currency=ANY(c.sell_currencies))) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:verified_private_rejected_registration:first-count",
      "intent_family": "independent11:verified_private_rejected_registration",
      "split": "locked_holdout",
      "category": "source_measure",
      "supported": true,
      "connection": "ct",
      "nl_query": "How many distinct private CT client records whose registration status is rejected but whose broker verification timestamp exists are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT c.user_id AS user_id FROM public.clients c WHERE c.type='PersonalAccount' AND c.status='rejected' AND EXISTS(SELECT 1 FROM public.broker_accounts ba WHERE ba.user_id=c.user_id AND ba.verified_at IS NOT NULL)) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:person_organization_owner_gap:first-count",
      "intent_family": "independent11:person_organization_owner_gap",
      "split": "locked_holdout",
      "category": "membership",
      "supported": true,
      "connection": "gold",
      "nl_query": "How many distinct Pipedrive people whose owner differs from the owner of their organization are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE p.owner_id IS NOT NULL AND o.owner_id IS NOT NULL AND p.owner_id<>o.owner_id) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:deal_person_organization_conflict:first-count",
      "intent_family": "independent11:deal_person_organization_conflict",
      "split": "locked_holdout",
      "category": "membership",
      "supported": true,
      "connection": "gold",
      "nl_query": "How many distinct Pipedrive people with a deal assigned to a different organization from their person record are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.deals d ON d.person_id=p.id WHERE p.org_id IS NOT NULL AND d.org_id IS NOT NULL AND p.org_id<>d.org_id) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:qualified_without_deal_stage:first-count",
      "intent_family": "independent11:qualified_without_deal_stage",
      "split": "locked_holdout",
      "category": "membership",
      "supported": true,
      "connection": "gold",
      "nl_query": "How many distinct Pipedrive people who have a lead qualification date but no deal in the Negotiation stage are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p WHERE p.pd_lead_qualified_at IS NOT NULL AND NOT EXISTS(SELECT 1 FROM pipedrive.deals d WHERE d.person_id=p.id AND d.stage_name='Negotiation')) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:person_note_pinned_exclusively:first-count",
      "intent_family": "independent11:person_note_pinned_exclusively",
      "split": "locked_holdout",
      "category": "membership",
      "supported": true,
      "connection": "gold",
      "nl_query": "How many distinct Pipedrive people with an active note pinned to the person but not pinned to a deal are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT n.person_id AS user_id FROM pipedrive.notes n WHERE n.active_flag IS TRUE AND n.pinned_to_person_flag IS TRUE AND n.pinned_to_deal_flag IS FALSE) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:activity_deadline_before_creation:first-count",
      "intent_family": "independent11:activity_deadline_before_creation",
      "split": "locked_holdout",
      "category": "membership",
      "supported": true,
      "connection": "gold",
      "nl_query": "How many distinct Pipedrive people with an activity whose due date precedes its creation date are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.person_id AS user_id FROM pipedrive.activities a WHERE a.due_date<a.add_time::date) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:overdue_expected_close:first-count",
      "intent_family": "independent11:overdue_expected_close",
      "split": "locked_holdout",
      "category": "membership",
      "supported": true,
      "connection": "gold",
      "nl_query": "How many distinct Pipedrive people with an open deal expected to close before 1 September 2026 but with no actual close timestamp are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT d.person_id AS user_id FROM pipedrive.deals d WHERE d.status='open' AND d.expected_close_date<DATE '2026-09-01' AND d.close_time IS NULL) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:organization_introducer_link:first-count",
      "intent_family": "independent11:organization_introducer_link",
      "split": "locked_holdout",
      "category": "membership",
      "supported": true,
      "connection": "gold",
      "nl_query": "How many distinct Pipedrive people at an organization whose company introducer is another known organization are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id JOIN pipedrive.organizations introducer ON introducer.id=o.cf_company_introducer_org_id WHERE introducer.id<>o.id) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:organization_employee_data_gap:first-count",
      "intent_family": "independent11:organization_employee_data_gap",
      "split": "locked_holdout",
      "category": "membership",
      "supported": true,
      "connection": "gold",
      "nl_query": "How many distinct Pipedrive people whose organization has a known positive employee count but an unknown people count are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE o.employee_count>0 AND o.people_count IS NULL) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:person_communication_preferences:first-count",
      "intent_family": "independent11:person_communication_preferences",
      "split": "locked_holdout",
      "category": "membership",
      "supported": true,
      "connection": "gold",
      "nl_query": "How many distinct Pipedrive people whose contact preference array includes email but not phone are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p WHERE 'email'=ANY(p.pd_contact_preferences) AND NOT('phone'=ANY(p.pd_contact_preferences))) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:person_multi_frequency_declarations:first-count",
      "intent_family": "independent11:person_multi_frequency_declarations",
      "split": "locked_holdout",
      "category": "membership",
      "supported": true,
      "connection": "gold",
      "nl_query": "How many distinct Pipedrive people who declared more than one trade frequency are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p WHERE CARDINALITY(p.pd_trade_frequency)>1) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:organization_hedging_multiple:first-count",
      "intent_family": "independent11:organization_hedging_multiple",
      "split": "locked_holdout",
      "category": "membership",
      "supported": true,
      "connection": "gold",
      "nl_query": "How many distinct Pipedrive people whose organization declares more than one booking or hedging policy are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE CARDINALITY(o.cf_booking_hedging_policy)>1) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:org_contact_without_website:first-count",
      "intent_family": "independent11:org_contact_without_website",
      "split": "locked_holdout",
      "category": "membership",
      "supported": true,
      "connection": "gold",
      "nl_query": "How many distinct Pipedrive people at an organization with a LinkedIn page and no website are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE o.linkedin IS NOT NULL AND o.website IS NULL) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:deal_assignment_override:first-count",
      "intent_family": "independent11:deal_assignment_override",
      "split": "locked_holdout",
      "category": "membership",
      "supported": true,
      "connection": "gold",
      "nl_query": "How many distinct Pipedrive people with an activity assigned to someone other than the owner of its deal are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT d.person_id AS user_id FROM pipedrive.activities a JOIN pipedrive.deals d ON d.id=a.deal_id WHERE a.assigned_to_user_id IS NOT NULL AND d.owner_id IS NOT NULL AND a.assigned_to_user_id<>d.owner_id) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:note_author_deal_owner_difference:first-count",
      "intent_family": "independent11:note_author_deal_owner_difference",
      "split": "locked_holdout",
      "category": "membership",
      "supported": true,
      "connection": "gold",
      "nl_query": "How many distinct Pipedrive people with an active deal note authored by someone other than the deal owner are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT d.person_id AS user_id FROM pipedrive.notes n JOIN pipedrive.deals d ON d.id=n.deal_id WHERE n.active_flag IS TRUE AND n.author_user_id IS NOT NULL AND d.owner_id IS NOT NULL AND n.author_user_id<>d.owner_id) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:known_external_person_qualification:first-count",
      "intent_family": "independent11:known_external_person_qualification",
      "split": "locked_holdout",
      "category": "membership",
      "supported": true,
      "connection": "gold",
      "nl_query": "How many distinct Pipedrive people explicitly marked as non-employees whose lead qualification date follows their signup date are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p WHERE p.pd_is_ct_employee IS FALSE AND p.pd_lead_qualified_at>p.add_time::date) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:organization_erp_multiple:first-count",
      "intent_family": "independent11:organization_erp_multiple",
      "split": "locked_holdout",
      "category": "membership",
      "supported": true,
      "connection": "gold",
      "nl_query": "How many distinct Pipedrive people whose organization names at least two ERP systems are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE CARDINALITY(o.cf_erp)>=2) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:organization_wallet_share_unknown:first-count",
      "intent_family": "independent11:organization_wallet_share_unknown",
      "split": "locked_holdout",
      "category": "membership",
      "supported": true,
      "connection": "gold",
      "nl_query": "How many distinct Pipedrive people at an organization with a known service level but an unknown wallet-share value are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE o.cf_level_of_service IS NOT NULL AND o.cf_wallet_share IS NULL) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:activity_duration_missing_due_time:first-count",
      "intent_family": "independent11:activity_duration_missing_due_time",
      "split": "locked_holdout",
      "category": "membership",
      "supported": true,
      "connection": "gold",
      "nl_query": "How many distinct Pipedrive people with an activity that has a duration but no due time are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.person_id AS user_id FROM pipedrive.activities a WHERE a.duration IS NOT NULL AND a.due_time IS NULL) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:deal_stage_timestamp_order:first-count",
      "intent_family": "independent11:deal_stage_timestamp_order",
      "split": "locked_holdout",
      "category": "membership",
      "supported": true,
      "connection": "gold",
      "nl_query": "How many distinct Pipedrive people with a deal whose stage-change timestamp predates its creation timestamp are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT d.person_id AS user_id FROM pipedrive.deals d WHERE d.stage_change_time<d.add_time) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    },
    {
      "case_id": "independent11:organization_client_type_multiple:first-count",
      "intent_family": "independent11:organization_client_type_multiple",
      "split": "locked_holdout",
      "category": "membership",
      "supported": true,
      "connection": "gold",
      "nl_query": "How many distinct Pipedrive people at an organization with more than one client-type tag are there? Return client_count, including zero if none qualify.",
      "action": "query",
      "requires_parent": false,
      "expected": {
        "mode": "scalar",
        "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE CARDINALITY(o.cf_client_type_tags)>1) cohort",
        "contract": {
          "version": 11,
          "fields": [
            {
              "name": "client_count",
              "role": "count",
              "aliases": [
                "client_count",
                "count",
                "total_clients",
                "user_count",
                "person_count"
              ]
            }
          ],
          "ordered": false,
          "complete_membership": true,
          "ambiguity": "none",
          "requires_parent": false,
          "accepted_refusals": []
        }
      }
    }
  ],
  "conversations": [
    {
      "conversation_id": "independent11:marketing_registration_gap:chain",
      "intent_family": "independent11:marketing_registration_gap",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:marketing_registration_gap:t1",
          "intent_family": "independent11:marketing_registration_gap",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "List every distinct ordinary CT user accounts opted in to marketing emails whose registration is still incomplete. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.clients c ON c.user_id=a.id JOIN public.notification_settings ns ON ns.account_credentials_id=a.credentials_id WHERE a.role='User' AND ns.marketing_emails_enabled IS TRUE AND c.completed_registration_at IS NULL ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:marketing_registration_gap:t2",
          "intent_family": "independent11:marketing_registration_gap",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "For exactly the ordinary CT user accounts opted in to marketing emails whose registration is still incomplete in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.clients c ON c.user_id=a.id JOIN public.notification_settings ns ON ns.account_credentials_id=a.credentials_id WHERE a.role='User' AND ns.marketing_emails_enabled IS TRUE AND c.completed_registration_at IS NULL) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:marketing_registration_gap:t3",
          "intent_family": "independent11:marketing_registration_gap",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Show the same checked IDs for the ordinary CT user accounts opted in to marketing emails whose registration is still incomplete from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.clients c ON c.user_id=a.id JOIN public.notification_settings ns ON ns.account_credentials_id=a.credentials_id WHERE a.role='User' AND ns.marketing_emails_enabled IS TRUE AND c.completed_registration_at IS NULL ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:marketing_registration_gap:t4",
          "intent_family": "independent11:marketing_registration_gap",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Keep the ordinary CT user accounts opted in to marketing emails whose registration is still incomplete membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.clients c ON c.user_id=a.id JOIN public.notification_settings ns ON ns.account_credentials_id=a.credentials_id WHERE a.role='User' AND ns.marketing_emails_enabled IS TRUE AND c.completed_registration_at IS NULL) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:verified_after_registration:chain",
      "intent_family": "independent11:verified_after_registration",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:verified_after_registration:t1",
          "intent_family": "independent11:verified_after_registration",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "List every distinct CT accounts of any role whose earliest verified broker account date is after their completed registration date. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT c.user_id AS user_id FROM public.clients c WHERE c.completed_registration_at IS NOT NULL AND (SELECT MIN(ba.verified_at) FROM public.broker_accounts ba WHERE ba.user_id=c.user_id)>c.completed_registration_at ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:verified_after_registration:t2",
          "intent_family": "independent11:verified_after_registration",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "For exactly the CT accounts of any role whose earliest verified broker account date is after their completed registration date in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT c.user_id AS user_id FROM public.clients c WHERE c.completed_registration_at IS NOT NULL AND (SELECT MIN(ba.verified_at) FROM public.broker_accounts ba WHERE ba.user_id=c.user_id)>c.completed_registration_at) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:verified_after_registration:t3",
          "intent_family": "independent11:verified_after_registration",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Show the same checked IDs for the CT accounts of any role whose earliest verified broker account date is after their completed registration date from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT c.user_id AS user_id FROM public.clients c WHERE c.completed_registration_at IS NOT NULL AND (SELECT MIN(ba.verified_at) FROM public.broker_accounts ba WHERE ba.user_id=c.user_id)>c.completed_registration_at ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:verified_after_registration:t4",
          "intent_family": "independent11:verified_after_registration",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Keep the CT accounts of any role whose earliest verified broker account date is after their completed registration date membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT c.user_id AS user_id FROM public.clients c WHERE c.completed_registration_at IS NOT NULL AND (SELECT MIN(ba.verified_at) FROM public.broker_accounts ba WHERE ba.user_id=c.user_id)>c.completed_registration_at) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:notified_without_verification:chain",
      "intent_family": "independent11:notified_without_verification",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:notified_without_verification:t1",
          "intent_family": "independent11:notified_without_verification",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "List every distinct CT accounts of any role with a notified broker account but no broker account that has ever been verified. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE EXISTS(SELECT 1 FROM public.broker_accounts ba WHERE ba.user_id=a.id AND ba.notified_at IS NOT NULL) AND NOT EXISTS(SELECT 1 FROM public.broker_accounts bx WHERE bx.user_id=a.id AND bx.verified_at IS NOT NULL) ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:notified_without_verification:t2",
          "intent_family": "independent11:notified_without_verification",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "For exactly the CT accounts of any role with a notified broker account but no broker account that has ever been verified in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE EXISTS(SELECT 1 FROM public.broker_accounts ba WHERE ba.user_id=a.id AND ba.notified_at IS NOT NULL) AND NOT EXISTS(SELECT 1 FROM public.broker_accounts bx WHERE bx.user_id=a.id AND bx.verified_at IS NOT NULL)) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:notified_without_verification:t3",
          "intent_family": "independent11:notified_without_verification",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Show the same checked IDs for the CT accounts of any role with a notified broker account but no broker account that has ever been verified from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE EXISTS(SELECT 1 FROM public.broker_accounts ba WHERE ba.user_id=a.id AND ba.notified_at IS NOT NULL) AND NOT EXISTS(SELECT 1 FROM public.broker_accounts bx WHERE bx.user_id=a.id AND bx.verified_at IS NOT NULL) ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:notified_without_verification:t4",
          "intent_family": "independent11:notified_without_verification",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Keep the CT accounts of any role with a notified broker account but no broker account that has ever been verified membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE EXISTS(SELECT 1 FROM public.broker_accounts ba WHERE ba.user_id=a.id AND ba.notified_at IS NOT NULL) AND NOT EXISTS(SELECT 1 FROM public.broker_accounts bx WHERE bx.user_id=a.id AND bx.verified_at IS NOT NULL)) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:outdated_still_activated:chain",
      "intent_family": "independent11:outdated_still_activated",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:outdated_still_activated:t1",
          "intent_family": "independent11:outdated_still_activated",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "List every distinct CT accounts of any role with a previously verified broker account now marked outdated. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT ba.user_id AS user_id FROM public.broker_accounts ba WHERE ba.status='outdated' AND ba.verified_at IS NOT NULL ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:outdated_still_activated:t2",
          "intent_family": "independent11:outdated_still_activated",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "For exactly the CT accounts of any role with a previously verified broker account now marked outdated in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT ba.user_id AS user_id FROM public.broker_accounts ba WHERE ba.status='outdated' AND ba.verified_at IS NOT NULL) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:outdated_still_activated:t3",
          "intent_family": "independent11:outdated_still_activated",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Show the same checked IDs for the CT accounts of any role with a previously verified broker account now marked outdated from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT ba.user_id AS user_id FROM public.broker_accounts ba WHERE ba.status='outdated' AND ba.verified_at IS NOT NULL ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:outdated_still_activated:t4",
          "intent_family": "independent11:outdated_still_activated",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Keep the CT accounts of any role with a previously verified broker account now marked outdated membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT ba.user_id AS user_id FROM public.broker_accounts ba WHERE ba.status='outdated' AND ba.verified_at IS NOT NULL) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:multi_broker_activation:chain",
      "intent_family": "independent11:multi_broker_activation",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:multi_broker_activation:t1",
          "intent_family": "independent11:multi_broker_activation",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "List every distinct CT accounts of any role that have at least two different verified brokers. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT ba.user_id AS user_id FROM public.broker_accounts ba WHERE ba.user_id IN (SELECT user_id FROM public.broker_accounts WHERE verified_at IS NOT NULL GROUP BY user_id HAVING COUNT(DISTINCT broker_id)>=2) ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:multi_broker_activation:t2",
          "intent_family": "independent11:multi_broker_activation",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "For exactly the CT accounts of any role that have at least two different verified brokers in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT ba.user_id AS user_id FROM public.broker_accounts ba WHERE ba.user_id IN (SELECT user_id FROM public.broker_accounts WHERE verified_at IS NOT NULL GROUP BY user_id HAVING COUNT(DISTINCT broker_id)>=2)) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:multi_broker_activation:t3",
          "intent_family": "independent11:multi_broker_activation",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Show the same checked IDs for the CT accounts of any role that have at least two different verified brokers from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT ba.user_id AS user_id FROM public.broker_accounts ba WHERE ba.user_id IN (SELECT user_id FROM public.broker_accounts WHERE verified_at IS NOT NULL GROUP BY user_id HAVING COUNT(DISTINCT broker_id)>=2) ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:multi_broker_activation:t4",
          "intent_family": "independent11:multi_broker_activation",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Keep the CT accounts of any role that have at least two different verified brokers membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT ba.user_id AS user_id FROM public.broker_accounts ba WHERE ba.user_id IN (SELECT user_id FROM public.broker_accounts WHERE verified_at IS NOT NULL GROUP BY user_id HAVING COUNT(DISTINCT broker_id)>=2)) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:private_declared_currency_overlap:chain",
      "intent_family": "independent11:private_declared_currency_overlap",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:private_declared_currency_overlap:t1",
          "intent_family": "independent11:private_declared_currency_overlap",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "List every distinct private CT client records who declared at least one currency on both the sell and buy sides. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT c.user_id AS user_id FROM public.clients c WHERE c.type='PersonalAccount' AND c.sell_currencies && c.buy_currencies ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:private_declared_currency_overlap:t2",
          "intent_family": "independent11:private_declared_currency_overlap",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "For exactly the private CT client records who declared at least one currency on both the sell and buy sides in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT c.user_id AS user_id FROM public.clients c WHERE c.type='PersonalAccount' AND c.sell_currencies && c.buy_currencies) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:private_declared_currency_overlap:t3",
          "intent_family": "independent11:private_declared_currency_overlap",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Show the same checked IDs for the private CT client records who declared at least one currency on both the sell and buy sides from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT c.user_id AS user_id FROM public.clients c WHERE c.type='PersonalAccount' AND c.sell_currencies && c.buy_currencies ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:private_declared_currency_overlap:t4",
          "intent_family": "independent11:private_declared_currency_overlap",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Keep the private CT client records who declared at least one currency on both the sell and buy sides membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT c.user_id AS user_id FROM public.clients c WHERE c.type='PersonalAccount' AND c.sell_currencies && c.buy_currencies) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:corporate_registration_without_trade:chain",
      "intent_family": "independent11:corporate_registration_without_trade",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:corporate_registration_without_trade:t1",
          "intent_family": "independent11:corporate_registration_without_trade",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "List every distinct corporate CT client records with completed registration who have no non-deleted, non-closed booking. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT c.user_id AS user_id FROM public.clients c WHERE c.type IS NOT NULL AND c.type<>'PersonalAccount' AND c.completed_registration_at IS NOT NULL AND NOT EXISTS(SELECT 1 FROM public.trade_bookings tb WHERE tb.user_id=c.user_id AND tb.status<>'closed' AND tb.deleted_at IS NULL) ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:corporate_registration_without_trade:t2",
          "intent_family": "independent11:corporate_registration_without_trade",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "For exactly the corporate CT client records with completed registration who have no non-deleted, non-closed booking in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT c.user_id AS user_id FROM public.clients c WHERE c.type IS NOT NULL AND c.type<>'PersonalAccount' AND c.completed_registration_at IS NOT NULL AND NOT EXISTS(SELECT 1 FROM public.trade_bookings tb WHERE tb.user_id=c.user_id AND tb.status<>'closed' AND tb.deleted_at IS NULL)) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:corporate_registration_without_trade:t3",
          "intent_family": "independent11:corporate_registration_without_trade",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Show the same checked IDs for the corporate CT client records with completed registration who have no non-deleted, non-closed booking from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT c.user_id AS user_id FROM public.clients c WHERE c.type IS NOT NULL AND c.type<>'PersonalAccount' AND c.completed_registration_at IS NOT NULL AND NOT EXISTS(SELECT 1 FROM public.trade_bookings tb WHERE tb.user_id=c.user_id AND tb.status<>'closed' AND tb.deleted_at IS NULL) ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:corporate_registration_without_trade:t4",
          "intent_family": "independent11:corporate_registration_without_trade",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Keep the corporate CT client records with completed registration who have no non-deleted, non-closed booking membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT c.user_id AS user_id FROM public.clients c WHERE c.type IS NOT NULL AND c.type<>'PersonalAccount' AND c.completed_registration_at IS NOT NULL AND NOT EXISTS(SELECT 1 FROM public.trade_bookings tb WHERE tb.user_id=c.user_id AND tb.status<>'closed' AND tb.deleted_at IS NULL)) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:unknown_sti_with_broker:chain",
      "intent_family": "independent11:unknown_sti_with_broker",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:unknown_sti_with_broker:t1",
          "intent_family": "independent11:unknown_sti_with_broker",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "List every distinct CT client records whose client type is unknown and who have at least one broker account. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT c.user_id AS user_id FROM public.clients c WHERE c.type IS NULL AND EXISTS(SELECT 1 FROM public.broker_accounts ba WHERE ba.user_id=c.user_id) ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:unknown_sti_with_broker:t2",
          "intent_family": "independent11:unknown_sti_with_broker",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "For exactly the CT client records whose client type is unknown and who have at least one broker account in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT c.user_id AS user_id FROM public.clients c WHERE c.type IS NULL AND EXISTS(SELECT 1 FROM public.broker_accounts ba WHERE ba.user_id=c.user_id)) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:unknown_sti_with_broker:t3",
          "intent_family": "independent11:unknown_sti_with_broker",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Show the same checked IDs for the CT client records whose client type is unknown and who have at least one broker account from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT c.user_id AS user_id FROM public.clients c WHERE c.type IS NULL AND EXISTS(SELECT 1 FROM public.broker_accounts ba WHERE ba.user_id=c.user_id) ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:unknown_sti_with_broker:t4",
          "intent_family": "independent11:unknown_sti_with_broker",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Keep the CT client records whose client type is unknown and who have at least one broker account membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT c.user_id AS user_id FROM public.clients c WHERE c.type IS NULL AND EXISTS(SELECT 1 FROM public.broker_accounts ba WHERE ba.user_id=c.user_id)) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:quote_only_system_activity:chain",
      "intent_family": "independent11:quote_only_system_activity",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:quote_only_system_activity:t1",
          "intent_family": "independent11:quote_only_system_activity",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "List every distinct CT accounts of any role that have system-generated quotes and no user-requested quote. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE EXISTS(SELECT 1 FROM public.quotes q WHERE q.user_id=a.id AND q.type<>'by_client') AND NOT EXISTS(SELECT 1 FROM public.quotes q WHERE q.user_id=a.id AND q.type='by_client') ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:quote_only_system_activity:t2",
          "intent_family": "independent11:quote_only_system_activity",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "For exactly the CT accounts of any role that have system-generated quotes and no user-requested quote in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE EXISTS(SELECT 1 FROM public.quotes q WHERE q.user_id=a.id AND q.type<>'by_client') AND NOT EXISTS(SELECT 1 FROM public.quotes q WHERE q.user_id=a.id AND q.type='by_client')) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:quote_only_system_activity:t3",
          "intent_family": "independent11:quote_only_system_activity",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Show the same checked IDs for the CT accounts of any role that have system-generated quotes and no user-requested quote from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE EXISTS(SELECT 1 FROM public.quotes q WHERE q.user_id=a.id AND q.type<>'by_client') AND NOT EXISTS(SELECT 1 FROM public.quotes q WHERE q.user_id=a.id AND q.type='by_client') ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:quote_only_system_activity:t4",
          "intent_family": "independent11:quote_only_system_activity",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Keep the CT accounts of any role that have system-generated quotes and no user-requested quote membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE EXISTS(SELECT 1 FROM public.quotes q WHERE q.user_id=a.id AND q.type<>'by_client') AND NOT EXISTS(SELECT 1 FROM public.quotes q WHERE q.user_id=a.id AND q.type='by_client')) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:quote_conversion_valid_link:chain",
      "intent_family": "independent11:quote_conversion_valid_link",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:quote_conversion_valid_link:t1",
          "intent_family": "independent11:quote_conversion_valid_link",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "List every distinct CT accounts of any role whose own quote converted to a non-deleted, non-closed booking through the quote ID link. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT q.user_id AS user_id FROM public.quotes q JOIN public.trade_bookings tb ON tb.quote_id=q.id WHERE q.type='by_client' AND tb.deleted_at IS NULL AND tb.status<>'closed' ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:quote_conversion_valid_link:t2",
          "intent_family": "independent11:quote_conversion_valid_link",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "For exactly the CT accounts of any role whose own quote converted to a non-deleted, non-closed booking through the quote ID link in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT q.user_id AS user_id FROM public.quotes q JOIN public.trade_bookings tb ON tb.quote_id=q.id WHERE q.type='by_client' AND tb.deleted_at IS NULL AND tb.status<>'closed') cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:quote_conversion_valid_link:t3",
          "intent_family": "independent11:quote_conversion_valid_link",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Show the same checked IDs for the CT accounts of any role whose own quote converted to a non-deleted, non-closed booking through the quote ID link from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT q.user_id AS user_id FROM public.quotes q JOIN public.trade_bookings tb ON tb.quote_id=q.id WHERE q.type='by_client' AND tb.deleted_at IS NULL AND tb.status<>'closed' ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:quote_conversion_valid_link:t4",
          "intent_family": "independent11:quote_conversion_valid_link",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Keep the CT accounts of any role whose own quote converted to a non-deleted, non-closed booking through the quote ID link membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT q.user_id AS user_id FROM public.quotes q JOIN public.trade_bookings tb ON tb.quote_id=q.id WHERE q.type='by_client' AND tb.deleted_at IS NULL AND tb.status<>'closed') cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:quote_days_before_activation:chain",
      "intent_family": "independent11:quote_days_before_activation",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:quote_days_before_activation:t1",
          "intent_family": "independent11:quote_days_before_activation",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "List every distinct CT accounts of any role whose user-requested quote predates their earliest known broker verification timestamp. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT q.user_id AS user_id FROM public.quotes q WHERE q.type='by_client' AND q.created_at<(SELECT MIN(ba.verified_at) FROM public.broker_accounts ba WHERE ba.user_id=q.user_id) ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:quote_days_before_activation:t2",
          "intent_family": "independent11:quote_days_before_activation",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "For exactly the CT accounts of any role whose user-requested quote predates their earliest known broker verification timestamp in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT q.user_id AS user_id FROM public.quotes q WHERE q.type='by_client' AND q.created_at<(SELECT MIN(ba.verified_at) FROM public.broker_accounts ba WHERE ba.user_id=q.user_id)) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:quote_days_before_activation:t3",
          "intent_family": "independent11:quote_days_before_activation",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Show the same checked IDs for the CT accounts of any role whose user-requested quote predates their earliest known broker verification timestamp from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT q.user_id AS user_id FROM public.quotes q WHERE q.type='by_client' AND q.created_at<(SELECT MIN(ba.verified_at) FROM public.broker_accounts ba WHERE ba.user_id=q.user_id) ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:quote_days_before_activation:t4",
          "intent_family": "independent11:quote_days_before_activation",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Keep the CT accounts of any role whose user-requested quote predates their earliest known broker verification timestamp membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT q.user_id AS user_id FROM public.quotes q WHERE q.type='by_client' AND q.created_at<(SELECT MIN(ba.verified_at) FROM public.broker_accounts ba WHERE ba.user_id=q.user_id)) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:booked_without_settled_history:chain",
      "intent_family": "independent11:booked_without_settled_history",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:booked_without_settled_history:t1",
          "intent_family": "independent11:booked_without_settled_history",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "List every distinct CT accounts of any role with a non-deleted booking but no settled booking. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE EXISTS(SELECT 1 FROM public.trade_bookings tb WHERE tb.user_id=a.id AND tb.status<>'closed' AND tb.deleted_at IS NULL) AND NOT EXISTS(SELECT 1 FROM public.trade_bookings tb WHERE tb.user_id=a.id AND tb.status='settled') ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:booked_without_settled_history:t2",
          "intent_family": "independent11:booked_without_settled_history",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "For exactly the CT accounts of any role with a non-deleted booking but no settled booking in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE EXISTS(SELECT 1 FROM public.trade_bookings tb WHERE tb.user_id=a.id AND tb.status<>'closed' AND tb.deleted_at IS NULL) AND NOT EXISTS(SELECT 1 FROM public.trade_bookings tb WHERE tb.user_id=a.id AND tb.status='settled')) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:booked_without_settled_history:t3",
          "intent_family": "independent11:booked_without_settled_history",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Show the same checked IDs for the CT accounts of any role with a non-deleted booking but no settled booking from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE EXISTS(SELECT 1 FROM public.trade_bookings tb WHERE tb.user_id=a.id AND tb.status<>'closed' AND tb.deleted_at IS NULL) AND NOT EXISTS(SELECT 1 FROM public.trade_bookings tb WHERE tb.user_id=a.id AND tb.status='settled') ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:booked_without_settled_history:t4",
          "intent_family": "independent11:booked_without_settled_history",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Keep the CT accounts of any role with a non-deleted booking but no settled booking membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE EXISTS(SELECT 1 FROM public.trade_bookings tb WHERE tb.user_id=a.id AND tb.status<>'closed' AND tb.deleted_at IS NULL) AND NOT EXISTS(SELECT 1 FROM public.trade_bookings tb WHERE tb.user_id=a.id AND tb.status='settled')) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:invoice_before_settlement:chain",
      "intent_family": "independent11:invoice_before_settlement",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:invoice_before_settlement:t1",
          "intent_family": "independent11:invoice_before_settlement",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "List every distinct CT accounts of any role with an invoiced booking record that is neither closed nor settled, including records marked deleted. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT tb.user_id AS user_id FROM public.trade_bookings tb WHERE tb.status<>'closed' AND tb.status<>'settled' AND tb.invoice_at IS NOT NULL ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:invoice_before_settlement:t2",
          "intent_family": "independent11:invoice_before_settlement",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "For exactly the CT accounts of any role with an invoiced booking record that is neither closed nor settled, including records marked deleted in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT tb.user_id AS user_id FROM public.trade_bookings tb WHERE tb.status<>'closed' AND tb.status<>'settled' AND tb.invoice_at IS NOT NULL) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:invoice_before_settlement:t3",
          "intent_family": "independent11:invoice_before_settlement",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Show the same checked IDs for the CT accounts of any role with an invoiced booking record that is neither closed nor settled, including records marked deleted from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT tb.user_id AS user_id FROM public.trade_bookings tb WHERE tb.status<>'closed' AND tb.status<>'settled' AND tb.invoice_at IS NOT NULL ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:invoice_before_settlement:t4",
          "intent_family": "independent11:invoice_before_settlement",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Keep the CT accounts of any role with an invoiced booking record that is neither closed nor settled, including records marked deleted membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT tb.user_id AS user_id FROM public.trade_bookings tb WHERE tb.status<>'closed' AND tb.status<>'settled' AND tb.invoice_at IS NOT NULL) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:prebillable_eligible_stats:chain",
      "intent_family": "independent11:prebillable_eligible_stats",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:prebillable_eligible_stats:t1",
          "intent_family": "independent11:prebillable_eligible_stats",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "List every distinct CT accounts of any role with pre-billable bookings that qualify for the CT statistics filters. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.trade_bookings tb ON tb.user_id=a.id WHERE tb.status<>'closed' AND tb.traded_at IS NOT NULL AND tb.invoice_at IS NULL AND a.skip_commission_calculations IS NOT TRUE AND tb.sell_currency_to_gbp_rate IS NOT NULL ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:prebillable_eligible_stats:t2",
          "intent_family": "independent11:prebillable_eligible_stats",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "For exactly the CT accounts of any role with pre-billable bookings that qualify for the CT statistics filters in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.trade_bookings tb ON tb.user_id=a.id WHERE tb.status<>'closed' AND tb.traded_at IS NOT NULL AND tb.invoice_at IS NULL AND a.skip_commission_calculations IS NOT TRUE AND tb.sell_currency_to_gbp_rate IS NOT NULL) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:prebillable_eligible_stats:t3",
          "intent_family": "independent11:prebillable_eligible_stats",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Show the same checked IDs for the CT accounts of any role with pre-billable bookings that qualify for the CT statistics filters from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.trade_bookings tb ON tb.user_id=a.id WHERE tb.status<>'closed' AND tb.traded_at IS NOT NULL AND tb.invoice_at IS NULL AND a.skip_commission_calculations IS NOT TRUE AND tb.sell_currency_to_gbp_rate IS NOT NULL ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:prebillable_eligible_stats:t4",
          "intent_family": "independent11:prebillable_eligible_stats",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Keep the CT accounts of any role with pre-billable bookings that qualify for the CT statistics filters membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.trade_bookings tb ON tb.user_id=a.id WHERE tb.status<>'closed' AND tb.traded_at IS NOT NULL AND tb.invoice_at IS NULL AND a.skip_commission_calculations IS NOT TRUE AND tb.sell_currency_to_gbp_rate IS NOT NULL) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:deleted_booking_live_account:chain",
      "intent_family": "independent11:deleted_booking_live_account",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:deleted_booking_live_account:t1",
          "intent_family": "independent11:deleted_booking_live_account",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "List every distinct CT accounts of any role whose account is not deleted but who have a deleted booking. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.trade_bookings tb ON tb.user_id=a.id WHERE a.deleted_at IS NULL AND tb.deleted_at IS NOT NULL ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:deleted_booking_live_account:t2",
          "intent_family": "independent11:deleted_booking_live_account",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "For exactly the CT accounts of any role whose account is not deleted but who have a deleted booking in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.trade_bookings tb ON tb.user_id=a.id WHERE a.deleted_at IS NULL AND tb.deleted_at IS NOT NULL) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:deleted_booking_live_account:t3",
          "intent_family": "independent11:deleted_booking_live_account",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Show the same checked IDs for the CT accounts of any role whose account is not deleted but who have a deleted booking from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.trade_bookings tb ON tb.user_id=a.id WHERE a.deleted_at IS NULL AND tb.deleted_at IS NOT NULL ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:deleted_booking_live_account:t4",
          "intent_family": "independent11:deleted_booking_live_account",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Keep the CT accounts of any role whose account is not deleted but who have a deleted booking membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.trade_bookings tb ON tb.user_id=a.id WHERE a.deleted_at IS NULL AND tb.deleted_at IS NOT NULL) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:fx_missing_on_settled:chain",
      "intent_family": "independent11:fx_missing_on_settled",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:fx_missing_on_settled:t1",
          "intent_family": "independent11:fx_missing_on_settled",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "List every distinct CT accounts of any role with a settled booking that has no sell-currency-to-GBP rate. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT tb.user_id AS user_id FROM public.trade_bookings tb WHERE tb.status='settled' AND tb.sell_currency_to_gbp_rate IS NULL ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:fx_missing_on_settled:t2",
          "intent_family": "independent11:fx_missing_on_settled",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "For exactly the CT accounts of any role with a settled booking that has no sell-currency-to-GBP rate in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT tb.user_id AS user_id FROM public.trade_bookings tb WHERE tb.status='settled' AND tb.sell_currency_to_gbp_rate IS NULL) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:fx_missing_on_settled:t3",
          "intent_family": "independent11:fx_missing_on_settled",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Show the same checked IDs for the CT accounts of any role with a settled booking that has no sell-currency-to-GBP rate from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT tb.user_id AS user_id FROM public.trade_bookings tb WHERE tb.status='settled' AND tb.sell_currency_to_gbp_rate IS NULL ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:fx_missing_on_settled:t4",
          "intent_family": "independent11:fx_missing_on_settled",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Keep the CT accounts of any role with a settled booking that has no sell-currency-to-GBP rate membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT tb.user_id AS user_id FROM public.trade_bookings tb WHERE tb.status='settled' AND tb.sell_currency_to_gbp_rate IS NULL) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:negative_realized_commission:chain",
      "intent_family": "independent11:negative_realized_commission",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:negative_realized_commission:t1",
          "intent_family": "independent11:negative_realized_commission",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "List every distinct CT accounts of any role whose sum of known realized commission is negative. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE a.id IN (SELECT tb.user_id FROM public.trade_bookings tb JOIN public.trade_details td ON td.trade_booking_id=tb.id WHERE tb.status='settled' GROUP BY tb.user_id HAVING SUM(td.commission)<0) ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:negative_realized_commission:t2",
          "intent_family": "independent11:negative_realized_commission",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "For exactly the CT accounts of any role whose sum of known realized commission is negative in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE a.id IN (SELECT tb.user_id FROM public.trade_bookings tb JOIN public.trade_details td ON td.trade_booking_id=tb.id WHERE tb.status='settled' GROUP BY tb.user_id HAVING SUM(td.commission)<0)) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:negative_realized_commission:t3",
          "intent_family": "independent11:negative_realized_commission",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Show the same checked IDs for the CT accounts of any role whose sum of known realized commission is negative from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE a.id IN (SELECT tb.user_id FROM public.trade_bookings tb JOIN public.trade_details td ON td.trade_booking_id=tb.id WHERE tb.status='settled' GROUP BY tb.user_id HAVING SUM(td.commission)<0) ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:negative_realized_commission:t4",
          "intent_family": "independent11:negative_realized_commission",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Keep the CT accounts of any role whose sum of known realized commission is negative membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE a.id IN (SELECT tb.user_id FROM public.trade_bookings tb JOIN public.trade_details td ON td.trade_booking_id=tb.id WHERE tb.status='settled' GROUP BY tb.user_id HAVING SUM(td.commission)<0)) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:all_commission_unknown:chain",
      "intent_family": "independent11:all_commission_unknown",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:all_commission_unknown:t1",
          "intent_family": "independent11:all_commission_unknown",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "List every distinct CT accounts of any role with booking records, including closed and deleted records, whose commission inputs are all unknown. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT tb.user_id AS user_id FROM public.trade_bookings tb JOIN public.trade_details td ON td.trade_booking_id=tb.id WHERE tb.user_id IN(SELECT bx.user_id FROM public.trade_bookings bx JOIN public.trade_details dx ON dx.trade_booking_id=bx.id GROUP BY bx.user_id HAVING COUNT(dx.commission)=0) ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:all_commission_unknown:t2",
          "intent_family": "independent11:all_commission_unknown",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "For exactly the CT accounts of any role with booking records, including closed and deleted records, whose commission inputs are all unknown in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT tb.user_id AS user_id FROM public.trade_bookings tb JOIN public.trade_details td ON td.trade_booking_id=tb.id WHERE tb.user_id IN(SELECT bx.user_id FROM public.trade_bookings bx JOIN public.trade_details dx ON dx.trade_booking_id=bx.id GROUP BY bx.user_id HAVING COUNT(dx.commission)=0)) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:all_commission_unknown:t3",
          "intent_family": "independent11:all_commission_unknown",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Show the same checked IDs for the CT accounts of any role with booking records, including closed and deleted records, whose commission inputs are all unknown from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT tb.user_id AS user_id FROM public.trade_bookings tb JOIN public.trade_details td ON td.trade_booking_id=tb.id WHERE tb.user_id IN(SELECT bx.user_id FROM public.trade_bookings bx JOIN public.trade_details dx ON dx.trade_booking_id=bx.id GROUP BY bx.user_id HAVING COUNT(dx.commission)=0) ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:all_commission_unknown:t4",
          "intent_family": "independent11:all_commission_unknown",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Keep the CT accounts of any role with booking records, including closed and deleted records, whose commission inputs are all unknown membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT tb.user_id AS user_id FROM public.trade_bookings tb JOIN public.trade_details td ON td.trade_booking_id=tb.id WHERE tb.user_id IN(SELECT bx.user_id FROM public.trade_bookings bx JOIN public.trade_details dx ON dx.trade_booking_id=bx.id GROUP BY bx.user_id HAVING COUNT(dx.commission)=0)) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:known_zero_booked_commission:chain",
      "intent_family": "independent11:known_zero_booked_commission",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:known_zero_booked_commission:t1",
          "intent_family": "independent11:known_zero_booked_commission",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "List every distinct CT accounts of any role with at least one known booked commission input and a booked commission total of exactly zero. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE a.skip_commission_calculations IS NOT TRUE AND a.id IN(SELECT tb.user_id FROM public.trade_bookings tb JOIN public.trade_details td ON td.trade_booking_id=tb.id WHERE tb.status<>'closed' AND tb.sell_currency_to_gbp_rate IS NOT NULL GROUP BY tb.user_id HAVING COUNT(td.commission)>0 AND SUM(td.commission)=0) ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:known_zero_booked_commission:t2",
          "intent_family": "independent11:known_zero_booked_commission",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "For exactly the CT accounts of any role with at least one known booked commission input and a booked commission total of exactly zero in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE a.skip_commission_calculations IS NOT TRUE AND a.id IN(SELECT tb.user_id FROM public.trade_bookings tb JOIN public.trade_details td ON td.trade_booking_id=tb.id WHERE tb.status<>'closed' AND tb.sell_currency_to_gbp_rate IS NOT NULL GROUP BY tb.user_id HAVING COUNT(td.commission)>0 AND SUM(td.commission)=0)) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:known_zero_booked_commission:t3",
          "intent_family": "independent11:known_zero_booked_commission",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Show the same checked IDs for the CT accounts of any role with at least one known booked commission input and a booked commission total of exactly zero from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE a.skip_commission_calculations IS NOT TRUE AND a.id IN(SELECT tb.user_id FROM public.trade_bookings tb JOIN public.trade_details td ON td.trade_booking_id=tb.id WHERE tb.status<>'closed' AND tb.sell_currency_to_gbp_rate IS NOT NULL GROUP BY tb.user_id HAVING COUNT(td.commission)>0 AND SUM(td.commission)=0) ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:known_zero_booked_commission:t4",
          "intent_family": "independent11:known_zero_booked_commission",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Keep the CT accounts of any role with at least one known booked commission input and a booked commission total of exactly zero membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE a.skip_commission_calculations IS NOT TRUE AND a.id IN(SELECT tb.user_id FROM public.trade_bookings tb JOIN public.trade_details td ON td.trade_booking_id=tb.id WHERE tb.status<>'closed' AND tb.sell_currency_to_gbp_rate IS NOT NULL GROUP BY tb.user_id HAVING COUNT(td.commission)>0 AND SUM(td.commission)=0)) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:deadline_actual_date_disagreement:chain",
      "intent_family": "independent11:deadline_actual_date_disagreement",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:deadline_actual_date_disagreement:t1",
          "intent_family": "independent11:deadline_actual_date_disagreement",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "List every distinct CT accounts of any role with a settled booking whose actual completion date differs from its settlement deadline date in Europe/London, treating raw timestamps as UTC. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT tb.user_id AS user_id FROM public.trade_bookings tb WHERE tb.status='settled' AND ((tb.completed_at AT TIME ZONE 'UTC') AT TIME ZONE 'Europe/London')::date<>((tb.settlement_at AT TIME ZONE 'UTC') AT TIME ZONE 'Europe/London')::date ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:deadline_actual_date_disagreement:t2",
          "intent_family": "independent11:deadline_actual_date_disagreement",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "For exactly the CT accounts of any role with a settled booking whose actual completion date differs from its settlement deadline date in Europe/London, treating raw timestamps as UTC in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT tb.user_id AS user_id FROM public.trade_bookings tb WHERE tb.status='settled' AND ((tb.completed_at AT TIME ZONE 'UTC') AT TIME ZONE 'Europe/London')::date<>((tb.settlement_at AT TIME ZONE 'UTC') AT TIME ZONE 'Europe/London')::date) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:deadline_actual_date_disagreement:t3",
          "intent_family": "independent11:deadline_actual_date_disagreement",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Show the same checked IDs for the CT accounts of any role with a settled booking whose actual completion date differs from its settlement deadline date in Europe/London, treating raw timestamps as UTC from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT tb.user_id AS user_id FROM public.trade_bookings tb WHERE tb.status='settled' AND ((tb.completed_at AT TIME ZONE 'UTC') AT TIME ZONE 'Europe/London')::date<>((tb.settlement_at AT TIME ZONE 'UTC') AT TIME ZONE 'Europe/London')::date ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:deadline_actual_date_disagreement:t4",
          "intent_family": "independent11:deadline_actual_date_disagreement",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Keep the CT accounts of any role with a settled booking whose actual completion date differs from its settlement deadline date in Europe/London, treating raw timestamps as UTC membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT tb.user_id AS user_id FROM public.trade_bookings tb WHERE tb.status='settled' AND ((tb.completed_at AT TIME ZONE 'UTC') AT TIME ZONE 'Europe/London')::date<>((tb.settlement_at AT TIME ZONE 'UTC') AT TIME ZONE 'Europe/London')::date) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:london_signup_month_edge:chain",
      "intent_family": "independent11:london_signup_month_edge",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:london_signup_month_edge:t1",
          "intent_family": "independent11:london_signup_month_edge",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "List every distinct ordinary CT user accounts created during September 2026 in Europe/London, interpreting raw timestamps as UTC. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE a.role='User' AND a.created_at>=TIMESTAMP '2026-08-31 23:00:00' AND a.created_at<TIMESTAMP '2026-09-30 23:00:00' ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:london_signup_month_edge:t2",
          "intent_family": "independent11:london_signup_month_edge",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "For exactly the ordinary CT user accounts created during September 2026 in Europe/London, interpreting raw timestamps as UTC in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE a.role='User' AND a.created_at>=TIMESTAMP '2026-08-31 23:00:00' AND a.created_at<TIMESTAMP '2026-09-30 23:00:00') cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:london_signup_month_edge:t3",
          "intent_family": "independent11:london_signup_month_edge",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Show the same checked IDs for the ordinary CT user accounts created during September 2026 in Europe/London, interpreting raw timestamps as UTC from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE a.role='User' AND a.created_at>=TIMESTAMP '2026-08-31 23:00:00' AND a.created_at<TIMESTAMP '2026-09-30 23:00:00' ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:london_signup_month_edge:t4",
          "intent_family": "independent11:london_signup_month_edge",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Keep the ordinary CT user accounts created during September 2026 in Europe/London, interpreting raw timestamps as UTC membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE a.role='User' AND a.created_at>=TIMESTAMP '2026-08-31 23:00:00' AND a.created_at<TIMESTAMP '2026-09-30 23:00:00') cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:first_booked_before_first_broker:chain",
      "intent_family": "independent11:first_booked_before_first_broker",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:first_booked_before_first_broker:t1",
          "intent_family": "independent11:first_booked_before_first_broker",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "List every distinct CT accounts of any role whose first non-deleted, non-closed booking predates their first broker verification. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE (SELECT MIN(tb.traded_at) FROM public.trade_bookings tb WHERE tb.user_id=a.id AND tb.status<>'closed' AND tb.deleted_at IS NULL)<(SELECT MIN(ba.verified_at) FROM public.broker_accounts ba WHERE ba.user_id=a.id) ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:first_booked_before_first_broker:t2",
          "intent_family": "independent11:first_booked_before_first_broker",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "For exactly the CT accounts of any role whose first non-deleted, non-closed booking predates their first broker verification in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE (SELECT MIN(tb.traded_at) FROM public.trade_bookings tb WHERE tb.user_id=a.id AND tb.status<>'closed' AND tb.deleted_at IS NULL)<(SELECT MIN(ba.verified_at) FROM public.broker_accounts ba WHERE ba.user_id=a.id)) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:first_booked_before_first_broker:t3",
          "intent_family": "independent11:first_booked_before_first_broker",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Show the same checked IDs for the CT accounts of any role whose first non-deleted, non-closed booking predates their first broker verification from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE (SELECT MIN(tb.traded_at) FROM public.trade_bookings tb WHERE tb.user_id=a.id AND tb.status<>'closed' AND tb.deleted_at IS NULL)<(SELECT MIN(ba.verified_at) FROM public.broker_accounts ba WHERE ba.user_id=a.id) ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:first_booked_before_first_broker:t4",
          "intent_family": "independent11:first_booked_before_first_broker",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Keep the CT accounts of any role whose first non-deleted, non-closed booking predates their first broker verification membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE (SELECT MIN(tb.traded_at) FROM public.trade_bookings tb WHERE tb.user_id=a.id AND tb.status<>'closed' AND tb.deleted_at IS NULL)<(SELECT MIN(ba.verified_at) FROM public.broker_accounts ba WHERE ba.user_id=a.id)) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:professional_zero_rate_referrals:chain",
      "intent_family": "independent11:professional_zero_rate_referrals",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:professional_zero_rate_referrals:t1",
          "intent_family": "independent11:professional_zero_rate_referrals",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "List every distinct CT client records referred by a professional affiliate whose commission rate is zero. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.accounts ref ON ref.id=a.affiliate_id JOIN public.affiliate_details ad ON ad.affiliate_id=ref.id WHERE ref.role IN('Affiliate','AffiliateManager','Partner') AND ad.commission_rate=0 ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:professional_zero_rate_referrals:t2",
          "intent_family": "independent11:professional_zero_rate_referrals",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "For exactly the CT client records referred by a professional affiliate whose commission rate is zero in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.accounts ref ON ref.id=a.affiliate_id JOIN public.affiliate_details ad ON ad.affiliate_id=ref.id WHERE ref.role IN('Affiliate','AffiliateManager','Partner') AND ad.commission_rate=0) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:professional_zero_rate_referrals:t3",
          "intent_family": "independent11:professional_zero_rate_referrals",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Show the same checked IDs for the CT client records referred by a professional affiliate whose commission rate is zero from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.accounts ref ON ref.id=a.affiliate_id JOIN public.affiliate_details ad ON ad.affiliate_id=ref.id WHERE ref.role IN('Affiliate','AffiliateManager','Partner') AND ad.commission_rate=0 ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:professional_zero_rate_referrals:t4",
          "intent_family": "independent11:professional_zero_rate_referrals",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Keep the CT client records referred by a professional affiliate whose commission rate is zero membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.accounts ref ON ref.id=a.affiliate_id JOIN public.affiliate_details ad ON ad.affiliate_id=ref.id WHERE ref.role IN('Affiliate','AffiliateManager','Partner') AND ad.commission_rate=0) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:customer_referrals_with_reward_event:chain",
      "intent_family": "independent11:customer_referrals_with_reward_event",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:customer_referrals_with_reward_event:t1",
          "intent_family": "independent11:customer_referrals_with_reward_event",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "List every distinct CT client records referred by a customer account where that referrer has a reward event for the same client. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.accounts ref ON ref.id=a.affiliate_id WHERE ref.role='User' AND EXISTS(SELECT 1 FROM public.reward_events re WHERE re.user_id=ref.id AND re.referred_user_id=a.id) ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:customer_referrals_with_reward_event:t2",
          "intent_family": "independent11:customer_referrals_with_reward_event",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "For exactly the CT client records referred by a customer account where that referrer has a reward event for the same client in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.accounts ref ON ref.id=a.affiliate_id WHERE ref.role='User' AND EXISTS(SELECT 1 FROM public.reward_events re WHERE re.user_id=ref.id AND re.referred_user_id=a.id)) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:customer_referrals_with_reward_event:t3",
          "intent_family": "independent11:customer_referrals_with_reward_event",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Show the same checked IDs for the CT client records referred by a customer account where that referrer has a reward event for the same client from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.accounts ref ON ref.id=a.affiliate_id WHERE ref.role='User' AND EXISTS(SELECT 1 FROM public.reward_events re WHERE re.user_id=ref.id AND re.referred_user_id=a.id) ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:customer_referrals_with_reward_event:t4",
          "intent_family": "independent11:customer_referrals_with_reward_event",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Keep the CT client records referred by a customer account where that referrer has a reward event for the same client membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.accounts ref ON ref.id=a.affiliate_id WHERE ref.role='User' AND EXISTS(SELECT 1 FROM public.reward_events re WHERE re.user_id=ref.id AND re.referred_user_id=a.id)) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:partner_paid_and_unpaid_statements:chain",
      "intent_family": "independent11:partner_paid_and_unpaid_statements",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:partner_paid_and_unpaid_statements:t1",
          "intent_family": "independent11:partner_paid_and_unpaid_statements",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "List every distinct professional CT partner accounts with both paid and unpaid monthly affiliate statements. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE a.role IN('Affiliate','AffiliateManager','Partner') AND EXISTS(SELECT 1 FROM public.affiliate_commission_statements s WHERE s.affiliate_id=a.id AND s.paid_at IS NOT NULL) AND EXISTS(SELECT 1 FROM public.affiliate_commission_statements s WHERE s.affiliate_id=a.id AND s.paid_at IS NULL) ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:partner_paid_and_unpaid_statements:t2",
          "intent_family": "independent11:partner_paid_and_unpaid_statements",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "For exactly the professional CT partner accounts with both paid and unpaid monthly affiliate statements in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE a.role IN('Affiliate','AffiliateManager','Partner') AND EXISTS(SELECT 1 FROM public.affiliate_commission_statements s WHERE s.affiliate_id=a.id AND s.paid_at IS NOT NULL) AND EXISTS(SELECT 1 FROM public.affiliate_commission_statements s WHERE s.affiliate_id=a.id AND s.paid_at IS NULL)) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:partner_paid_and_unpaid_statements:t3",
          "intent_family": "independent11:partner_paid_and_unpaid_statements",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Show the same checked IDs for the professional CT partner accounts with both paid and unpaid monthly affiliate statements from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE a.role IN('Affiliate','AffiliateManager','Partner') AND EXISTS(SELECT 1 FROM public.affiliate_commission_statements s WHERE s.affiliate_id=a.id AND s.paid_at IS NOT NULL) AND EXISTS(SELECT 1 FROM public.affiliate_commission_statements s WHERE s.affiliate_id=a.id AND s.paid_at IS NULL) ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:partner_paid_and_unpaid_statements:t4",
          "intent_family": "independent11:partner_paid_and_unpaid_statements",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Keep the professional CT partner accounts with both paid and unpaid monthly affiliate statements membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE a.role IN('Affiliate','AffiliateManager','Partner') AND EXISTS(SELECT 1 FROM public.affiliate_commission_statements s WHERE s.affiliate_id=a.id AND s.paid_at IS NOT NULL) AND EXISTS(SELECT 1 FROM public.affiliate_commission_statements s WHERE s.affiliate_id=a.id AND s.paid_at IS NULL)) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:different_sales_ownership:chain",
      "intent_family": "independent11:different_sales_ownership",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:different_sales_ownership:t1",
          "intent_family": "independent11:different_sales_ownership",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "List every distinct ordinary CT user accounts whose salesperson and relationship manager are both known and are different people. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE a.role='User' AND a.salesperson_id IS NOT NULL AND a.relationship_manager_id IS NOT NULL AND a.salesperson_id<>a.relationship_manager_id ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:different_sales_ownership:t2",
          "intent_family": "independent11:different_sales_ownership",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "For exactly the ordinary CT user accounts whose salesperson and relationship manager are both known and are different people in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE a.role='User' AND a.salesperson_id IS NOT NULL AND a.relationship_manager_id IS NOT NULL AND a.salesperson_id<>a.relationship_manager_id) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:different_sales_ownership:t3",
          "intent_family": "independent11:different_sales_ownership",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Show the same checked IDs for the ordinary CT user accounts whose salesperson and relationship manager are both known and are different people from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE a.role='User' AND a.salesperson_id IS NOT NULL AND a.relationship_manager_id IS NOT NULL AND a.salesperson_id<>a.relationship_manager_id ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:different_sales_ownership:t4",
          "intent_family": "independent11:different_sales_ownership",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Keep the ordinary CT user accounts whose salesperson and relationship manager are both known and are different people membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a WHERE a.role='User' AND a.salesperson_id IS NOT NULL AND a.relationship_manager_id IS NOT NULL AND a.salesperson_id<>a.relationship_manager_id) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:campaign_and_web_referral:chain",
      "intent_family": "independent11:campaign_and_web_referral",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:campaign_and_web_referral:t1",
          "intent_family": "independent11:campaign_and_web_referral",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "List every distinct CT accounts of any role assigned to a campaign and with a known web referral domain. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.campaigns ca ON ca.id=a.campaign_id JOIN public.user_analytics ua ON ua.user_id=a.id WHERE ua.came_from_domain IS NOT NULL AND ca.token IS NOT NULL ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:campaign_and_web_referral:t2",
          "intent_family": "independent11:campaign_and_web_referral",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "For exactly the CT accounts of any role assigned to a campaign and with a known web referral domain in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.campaigns ca ON ca.id=a.campaign_id JOIN public.user_analytics ua ON ua.user_id=a.id WHERE ua.came_from_domain IS NOT NULL AND ca.token IS NOT NULL) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:campaign_and_web_referral:t3",
          "intent_family": "independent11:campaign_and_web_referral",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Show the same checked IDs for the CT accounts of any role assigned to a campaign and with a known web referral domain from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.campaigns ca ON ca.id=a.campaign_id JOIN public.user_analytics ua ON ua.user_id=a.id WHERE ua.came_from_domain IS NOT NULL AND ca.token IS NOT NULL ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:campaign_and_web_referral:t4",
          "intent_family": "independent11:campaign_and_web_referral",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Keep the CT accounts of any role assigned to a campaign and with a known web referral domain membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.campaigns ca ON ca.id=a.campaign_id JOIN public.user_analytics ua ON ua.user_id=a.id WHERE ua.came_from_domain IS NOT NULL AND ca.token IS NOT NULL) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:funnel_incomplete_contact:chain",
      "intent_family": "independent11:funnel_incomplete_contact",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:funnel_incomplete_contact:t1",
          "intent_family": "independent11:funnel_incomplete_contact",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "List every distinct ordinary CT user accounts with complete registration but at least one missing or blank first-name, last-name, or telephone field. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.clients c ON c.user_id=a.id WHERE a.role='User' AND c.completed_registration_at IS NOT NULL AND (a.first_name IS NULL OR a.first_name='' OR a.last_name IS NULL OR a.last_name='' OR a.telephone IS NULL OR a.telephone='') ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:funnel_incomplete_contact:t2",
          "intent_family": "independent11:funnel_incomplete_contact",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "For exactly the ordinary CT user accounts with complete registration but at least one missing or blank first-name, last-name, or telephone field in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.clients c ON c.user_id=a.id WHERE a.role='User' AND c.completed_registration_at IS NOT NULL AND (a.first_name IS NULL OR a.first_name='' OR a.last_name IS NULL OR a.last_name='' OR a.telephone IS NULL OR a.telephone='')) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:funnel_incomplete_contact:t3",
          "intent_family": "independent11:funnel_incomplete_contact",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Show the same checked IDs for the ordinary CT user accounts with complete registration but at least one missing or blank first-name, last-name, or telephone field from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.clients c ON c.user_id=a.id WHERE a.role='User' AND c.completed_registration_at IS NOT NULL AND (a.first_name IS NULL OR a.first_name='' OR a.last_name IS NULL OR a.last_name='' OR a.telephone IS NULL OR a.telephone='') ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:funnel_incomplete_contact:t4",
          "intent_family": "independent11:funnel_incomplete_contact",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Keep the ordinary CT user accounts with complete registration but at least one missing or blank first-name, last-name, or telephone field membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.id AS user_id FROM public.accounts a JOIN public.clients c ON c.user_id=a.id WHERE a.role='User' AND c.completed_registration_at IS NOT NULL AND (a.first_name IS NULL OR a.first_name='' OR a.last_name IS NULL OR a.last_name='' OR a.telephone IS NULL OR a.telephone='')) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:trade_sell_not_declared:chain",
      "intent_family": "independent11:trade_sell_not_declared",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:trade_sell_not_declared:t1",
          "intent_family": "independent11:trade_sell_not_declared",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "List every distinct CT client records who booked a non-deleted, non-closed trade in a sell currency absent from their declared sell currencies. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT c.user_id AS user_id FROM public.clients c JOIN public.trade_bookings tb ON tb.user_id=c.user_id WHERE tb.status<>'closed' AND tb.deleted_at IS NULL AND c.sell_currencies IS NOT NULL AND NOT(tb.sell_currency=ANY(c.sell_currencies)) ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:trade_sell_not_declared:t2",
          "intent_family": "independent11:trade_sell_not_declared",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "For exactly the CT client records who booked a non-deleted, non-closed trade in a sell currency absent from their declared sell currencies in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT c.user_id AS user_id FROM public.clients c JOIN public.trade_bookings tb ON tb.user_id=c.user_id WHERE tb.status<>'closed' AND tb.deleted_at IS NULL AND c.sell_currencies IS NOT NULL AND NOT(tb.sell_currency=ANY(c.sell_currencies))) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:trade_sell_not_declared:t3",
          "intent_family": "independent11:trade_sell_not_declared",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Show the same checked IDs for the CT client records who booked a non-deleted, non-closed trade in a sell currency absent from their declared sell currencies from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT c.user_id AS user_id FROM public.clients c JOIN public.trade_bookings tb ON tb.user_id=c.user_id WHERE tb.status<>'closed' AND tb.deleted_at IS NULL AND c.sell_currencies IS NOT NULL AND NOT(tb.sell_currency=ANY(c.sell_currencies)) ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:trade_sell_not_declared:t4",
          "intent_family": "independent11:trade_sell_not_declared",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Keep the CT client records who booked a non-deleted, non-closed trade in a sell currency absent from their declared sell currencies membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT c.user_id AS user_id FROM public.clients c JOIN public.trade_bookings tb ON tb.user_id=c.user_id WHERE tb.status<>'closed' AND tb.deleted_at IS NULL AND c.sell_currencies IS NOT NULL AND NOT(tb.sell_currency=ANY(c.sell_currencies))) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:verified_private_rejected_registration:chain",
      "intent_family": "independent11:verified_private_rejected_registration",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:verified_private_rejected_registration:t1",
          "intent_family": "independent11:verified_private_rejected_registration",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "List every distinct private CT client records whose registration status is rejected but whose broker verification timestamp exists. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT c.user_id AS user_id FROM public.clients c WHERE c.type='PersonalAccount' AND c.status='rejected' AND EXISTS(SELECT 1 FROM public.broker_accounts ba WHERE ba.user_id=c.user_id AND ba.verified_at IS NOT NULL) ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:verified_private_rejected_registration:t2",
          "intent_family": "independent11:verified_private_rejected_registration",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "For exactly the private CT client records whose registration status is rejected but whose broker verification timestamp exists in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT c.user_id AS user_id FROM public.clients c WHERE c.type='PersonalAccount' AND c.status='rejected' AND EXISTS(SELECT 1 FROM public.broker_accounts ba WHERE ba.user_id=c.user_id AND ba.verified_at IS NOT NULL)) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:verified_private_rejected_registration:t3",
          "intent_family": "independent11:verified_private_rejected_registration",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Show the same checked IDs for the private CT client records whose registration status is rejected but whose broker verification timestamp exists from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT c.user_id AS user_id FROM public.clients c WHERE c.type='PersonalAccount' AND c.status='rejected' AND EXISTS(SELECT 1 FROM public.broker_accounts ba WHERE ba.user_id=c.user_id AND ba.verified_at IS NOT NULL) ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:verified_private_rejected_registration:t4",
          "intent_family": "independent11:verified_private_rejected_registration",
          "split": "locked_holdout",
          "category": "source_measure",
          "supported": true,
          "connection": "ct",
          "nl_query": "Keep the private CT client records whose registration status is rejected but whose broker verification timestamp exists membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT c.user_id AS user_id FROM public.clients c WHERE c.type='PersonalAccount' AND c.status='rejected' AND EXISTS(SELECT 1 FROM public.broker_accounts ba WHERE ba.user_id=c.user_id AND ba.verified_at IS NOT NULL)) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:person_organization_owner_gap:chain",
      "intent_family": "independent11:person_organization_owner_gap",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:person_organization_owner_gap:t1",
          "intent_family": "independent11:person_organization_owner_gap",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "List every distinct Pipedrive people whose owner differs from the owner of their organization. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE p.owner_id IS NOT NULL AND o.owner_id IS NOT NULL AND p.owner_id<>o.owner_id ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:person_organization_owner_gap:t2",
          "intent_family": "independent11:person_organization_owner_gap",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "For exactly the Pipedrive people whose owner differs from the owner of their organization in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE p.owner_id IS NOT NULL AND o.owner_id IS NOT NULL AND p.owner_id<>o.owner_id) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:person_organization_owner_gap:t3",
          "intent_family": "independent11:person_organization_owner_gap",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Show the same checked IDs for the Pipedrive people whose owner differs from the owner of their organization from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE p.owner_id IS NOT NULL AND o.owner_id IS NOT NULL AND p.owner_id<>o.owner_id ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:person_organization_owner_gap:t4",
          "intent_family": "independent11:person_organization_owner_gap",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Keep the Pipedrive people whose owner differs from the owner of their organization membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE p.owner_id IS NOT NULL AND o.owner_id IS NOT NULL AND p.owner_id<>o.owner_id) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:deal_person_organization_conflict:chain",
      "intent_family": "independent11:deal_person_organization_conflict",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:deal_person_organization_conflict:t1",
          "intent_family": "independent11:deal_person_organization_conflict",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "List every distinct Pipedrive people with a deal assigned to a different organization from their person record. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.deals d ON d.person_id=p.id WHERE p.org_id IS NOT NULL AND d.org_id IS NOT NULL AND p.org_id<>d.org_id ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:deal_person_organization_conflict:t2",
          "intent_family": "independent11:deal_person_organization_conflict",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "For exactly the Pipedrive people with a deal assigned to a different organization from their person record in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.deals d ON d.person_id=p.id WHERE p.org_id IS NOT NULL AND d.org_id IS NOT NULL AND p.org_id<>d.org_id) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:deal_person_organization_conflict:t3",
          "intent_family": "independent11:deal_person_organization_conflict",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Show the same checked IDs for the Pipedrive people with a deal assigned to a different organization from their person record from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.deals d ON d.person_id=p.id WHERE p.org_id IS NOT NULL AND d.org_id IS NOT NULL AND p.org_id<>d.org_id ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:deal_person_organization_conflict:t4",
          "intent_family": "independent11:deal_person_organization_conflict",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Keep the Pipedrive people with a deal assigned to a different organization from their person record membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.deals d ON d.person_id=p.id WHERE p.org_id IS NOT NULL AND d.org_id IS NOT NULL AND p.org_id<>d.org_id) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:qualified_without_deal_stage:chain",
      "intent_family": "independent11:qualified_without_deal_stage",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:qualified_without_deal_stage:t1",
          "intent_family": "independent11:qualified_without_deal_stage",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "List every distinct Pipedrive people who have a lead qualification date but no deal in the Negotiation stage. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p WHERE p.pd_lead_qualified_at IS NOT NULL AND NOT EXISTS(SELECT 1 FROM pipedrive.deals d WHERE d.person_id=p.id AND d.stage_name='Negotiation') ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:qualified_without_deal_stage:t2",
          "intent_family": "independent11:qualified_without_deal_stage",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "For exactly the Pipedrive people who have a lead qualification date but no deal in the Negotiation stage in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p WHERE p.pd_lead_qualified_at IS NOT NULL AND NOT EXISTS(SELECT 1 FROM pipedrive.deals d WHERE d.person_id=p.id AND d.stage_name='Negotiation')) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:qualified_without_deal_stage:t3",
          "intent_family": "independent11:qualified_without_deal_stage",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Show the same checked IDs for the Pipedrive people who have a lead qualification date but no deal in the Negotiation stage from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p WHERE p.pd_lead_qualified_at IS NOT NULL AND NOT EXISTS(SELECT 1 FROM pipedrive.deals d WHERE d.person_id=p.id AND d.stage_name='Negotiation') ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:qualified_without_deal_stage:t4",
          "intent_family": "independent11:qualified_without_deal_stage",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Keep the Pipedrive people who have a lead qualification date but no deal in the Negotiation stage membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p WHERE p.pd_lead_qualified_at IS NOT NULL AND NOT EXISTS(SELECT 1 FROM pipedrive.deals d WHERE d.person_id=p.id AND d.stage_name='Negotiation')) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:person_note_pinned_exclusively:chain",
      "intent_family": "independent11:person_note_pinned_exclusively",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:person_note_pinned_exclusively:t1",
          "intent_family": "independent11:person_note_pinned_exclusively",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "List every distinct Pipedrive people with an active note pinned to the person but not pinned to a deal. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT n.person_id AS user_id FROM pipedrive.notes n WHERE n.active_flag IS TRUE AND n.pinned_to_person_flag IS TRUE AND n.pinned_to_deal_flag IS FALSE ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:person_note_pinned_exclusively:t2",
          "intent_family": "independent11:person_note_pinned_exclusively",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "For exactly the Pipedrive people with an active note pinned to the person but not pinned to a deal in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT n.person_id AS user_id FROM pipedrive.notes n WHERE n.active_flag IS TRUE AND n.pinned_to_person_flag IS TRUE AND n.pinned_to_deal_flag IS FALSE) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:person_note_pinned_exclusively:t3",
          "intent_family": "independent11:person_note_pinned_exclusively",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Show the same checked IDs for the Pipedrive people with an active note pinned to the person but not pinned to a deal from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT n.person_id AS user_id FROM pipedrive.notes n WHERE n.active_flag IS TRUE AND n.pinned_to_person_flag IS TRUE AND n.pinned_to_deal_flag IS FALSE ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:person_note_pinned_exclusively:t4",
          "intent_family": "independent11:person_note_pinned_exclusively",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Keep the Pipedrive people with an active note pinned to the person but not pinned to a deal membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT n.person_id AS user_id FROM pipedrive.notes n WHERE n.active_flag IS TRUE AND n.pinned_to_person_flag IS TRUE AND n.pinned_to_deal_flag IS FALSE) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:activity_deadline_before_creation:chain",
      "intent_family": "independent11:activity_deadline_before_creation",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:activity_deadline_before_creation:t1",
          "intent_family": "independent11:activity_deadline_before_creation",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "List every distinct Pipedrive people with an activity whose due date precedes its creation date. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.person_id AS user_id FROM pipedrive.activities a WHERE a.due_date<a.add_time::date ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:activity_deadline_before_creation:t2",
          "intent_family": "independent11:activity_deadline_before_creation",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "For exactly the Pipedrive people with an activity whose due date precedes its creation date in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.person_id AS user_id FROM pipedrive.activities a WHERE a.due_date<a.add_time::date) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:activity_deadline_before_creation:t3",
          "intent_family": "independent11:activity_deadline_before_creation",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Show the same checked IDs for the Pipedrive people with an activity whose due date precedes its creation date from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.person_id AS user_id FROM pipedrive.activities a WHERE a.due_date<a.add_time::date ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:activity_deadline_before_creation:t4",
          "intent_family": "independent11:activity_deadline_before_creation",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Keep the Pipedrive people with an activity whose due date precedes its creation date membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.person_id AS user_id FROM pipedrive.activities a WHERE a.due_date<a.add_time::date) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:overdue_expected_close:chain",
      "intent_family": "independent11:overdue_expected_close",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:overdue_expected_close:t1",
          "intent_family": "independent11:overdue_expected_close",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "List every distinct Pipedrive people with an open deal expected to close before 1 September 2026 but with no actual close timestamp. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT d.person_id AS user_id FROM pipedrive.deals d WHERE d.status='open' AND d.expected_close_date<DATE '2026-09-01' AND d.close_time IS NULL ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:overdue_expected_close:t2",
          "intent_family": "independent11:overdue_expected_close",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "For exactly the Pipedrive people with an open deal expected to close before 1 September 2026 but with no actual close timestamp in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT d.person_id AS user_id FROM pipedrive.deals d WHERE d.status='open' AND d.expected_close_date<DATE '2026-09-01' AND d.close_time IS NULL) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:overdue_expected_close:t3",
          "intent_family": "independent11:overdue_expected_close",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Show the same checked IDs for the Pipedrive people with an open deal expected to close before 1 September 2026 but with no actual close timestamp from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT d.person_id AS user_id FROM pipedrive.deals d WHERE d.status='open' AND d.expected_close_date<DATE '2026-09-01' AND d.close_time IS NULL ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:overdue_expected_close:t4",
          "intent_family": "independent11:overdue_expected_close",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Keep the Pipedrive people with an open deal expected to close before 1 September 2026 but with no actual close timestamp membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT d.person_id AS user_id FROM pipedrive.deals d WHERE d.status='open' AND d.expected_close_date<DATE '2026-09-01' AND d.close_time IS NULL) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:organization_introducer_link:chain",
      "intent_family": "independent11:organization_introducer_link",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:organization_introducer_link:t1",
          "intent_family": "independent11:organization_introducer_link",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "List every distinct Pipedrive people at an organization whose company introducer is another known organization. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id JOIN pipedrive.organizations introducer ON introducer.id=o.cf_company_introducer_org_id WHERE introducer.id<>o.id ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:organization_introducer_link:t2",
          "intent_family": "independent11:organization_introducer_link",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "For exactly the Pipedrive people at an organization whose company introducer is another known organization in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id JOIN pipedrive.organizations introducer ON introducer.id=o.cf_company_introducer_org_id WHERE introducer.id<>o.id) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:organization_introducer_link:t3",
          "intent_family": "independent11:organization_introducer_link",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Show the same checked IDs for the Pipedrive people at an organization whose company introducer is another known organization from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id JOIN pipedrive.organizations introducer ON introducer.id=o.cf_company_introducer_org_id WHERE introducer.id<>o.id ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:organization_introducer_link:t4",
          "intent_family": "independent11:organization_introducer_link",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Keep the Pipedrive people at an organization whose company introducer is another known organization membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id JOIN pipedrive.organizations introducer ON introducer.id=o.cf_company_introducer_org_id WHERE introducer.id<>o.id) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:organization_employee_data_gap:chain",
      "intent_family": "independent11:organization_employee_data_gap",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:organization_employee_data_gap:t1",
          "intent_family": "independent11:organization_employee_data_gap",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "List every distinct Pipedrive people whose organization has a known positive employee count but an unknown people count. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE o.employee_count>0 AND o.people_count IS NULL ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:organization_employee_data_gap:t2",
          "intent_family": "independent11:organization_employee_data_gap",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "For exactly the Pipedrive people whose organization has a known positive employee count but an unknown people count in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE o.employee_count>0 AND o.people_count IS NULL) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:organization_employee_data_gap:t3",
          "intent_family": "independent11:organization_employee_data_gap",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Show the same checked IDs for the Pipedrive people whose organization has a known positive employee count but an unknown people count from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE o.employee_count>0 AND o.people_count IS NULL ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:organization_employee_data_gap:t4",
          "intent_family": "independent11:organization_employee_data_gap",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Keep the Pipedrive people whose organization has a known positive employee count but an unknown people count membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE o.employee_count>0 AND o.people_count IS NULL) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:person_communication_preferences:chain",
      "intent_family": "independent11:person_communication_preferences",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:person_communication_preferences:t1",
          "intent_family": "independent11:person_communication_preferences",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "List every distinct Pipedrive people whose contact preference array includes email but not phone. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p WHERE 'email'=ANY(p.pd_contact_preferences) AND NOT('phone'=ANY(p.pd_contact_preferences)) ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:person_communication_preferences:t2",
          "intent_family": "independent11:person_communication_preferences",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "For exactly the Pipedrive people whose contact preference array includes email but not phone in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p WHERE 'email'=ANY(p.pd_contact_preferences) AND NOT('phone'=ANY(p.pd_contact_preferences))) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:person_communication_preferences:t3",
          "intent_family": "independent11:person_communication_preferences",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Show the same checked IDs for the Pipedrive people whose contact preference array includes email but not phone from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p WHERE 'email'=ANY(p.pd_contact_preferences) AND NOT('phone'=ANY(p.pd_contact_preferences)) ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:person_communication_preferences:t4",
          "intent_family": "independent11:person_communication_preferences",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Keep the Pipedrive people whose contact preference array includes email but not phone membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p WHERE 'email'=ANY(p.pd_contact_preferences) AND NOT('phone'=ANY(p.pd_contact_preferences))) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:person_multi_frequency_declarations:chain",
      "intent_family": "independent11:person_multi_frequency_declarations",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:person_multi_frequency_declarations:t1",
          "intent_family": "independent11:person_multi_frequency_declarations",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "List every distinct Pipedrive people who declared more than one trade frequency. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p WHERE CARDINALITY(p.pd_trade_frequency)>1 ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:person_multi_frequency_declarations:t2",
          "intent_family": "independent11:person_multi_frequency_declarations",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "For exactly the Pipedrive people who declared more than one trade frequency in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p WHERE CARDINALITY(p.pd_trade_frequency)>1) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:person_multi_frequency_declarations:t3",
          "intent_family": "independent11:person_multi_frequency_declarations",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Show the same checked IDs for the Pipedrive people who declared more than one trade frequency from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p WHERE CARDINALITY(p.pd_trade_frequency)>1 ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:person_multi_frequency_declarations:t4",
          "intent_family": "independent11:person_multi_frequency_declarations",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Keep the Pipedrive people who declared more than one trade frequency membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p WHERE CARDINALITY(p.pd_trade_frequency)>1) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:organization_hedging_multiple:chain",
      "intent_family": "independent11:organization_hedging_multiple",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:organization_hedging_multiple:t1",
          "intent_family": "independent11:organization_hedging_multiple",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "List every distinct Pipedrive people whose organization declares more than one booking or hedging policy. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE CARDINALITY(o.cf_booking_hedging_policy)>1 ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:organization_hedging_multiple:t2",
          "intent_family": "independent11:organization_hedging_multiple",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "For exactly the Pipedrive people whose organization declares more than one booking or hedging policy in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE CARDINALITY(o.cf_booking_hedging_policy)>1) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:organization_hedging_multiple:t3",
          "intent_family": "independent11:organization_hedging_multiple",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Show the same checked IDs for the Pipedrive people whose organization declares more than one booking or hedging policy from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE CARDINALITY(o.cf_booking_hedging_policy)>1 ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:organization_hedging_multiple:t4",
          "intent_family": "independent11:organization_hedging_multiple",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Keep the Pipedrive people whose organization declares more than one booking or hedging policy membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE CARDINALITY(o.cf_booking_hedging_policy)>1) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:org_contact_without_website:chain",
      "intent_family": "independent11:org_contact_without_website",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:org_contact_without_website:t1",
          "intent_family": "independent11:org_contact_without_website",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "List every distinct Pipedrive people at an organization with a LinkedIn page and no website. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE o.linkedin IS NOT NULL AND o.website IS NULL ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:org_contact_without_website:t2",
          "intent_family": "independent11:org_contact_without_website",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "For exactly the Pipedrive people at an organization with a LinkedIn page and no website in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE o.linkedin IS NOT NULL AND o.website IS NULL) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:org_contact_without_website:t3",
          "intent_family": "independent11:org_contact_without_website",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Show the same checked IDs for the Pipedrive people at an organization with a LinkedIn page and no website from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE o.linkedin IS NOT NULL AND o.website IS NULL ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:org_contact_without_website:t4",
          "intent_family": "independent11:org_contact_without_website",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Keep the Pipedrive people at an organization with a LinkedIn page and no website membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE o.linkedin IS NOT NULL AND o.website IS NULL) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:deal_assignment_override:chain",
      "intent_family": "independent11:deal_assignment_override",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:deal_assignment_override:t1",
          "intent_family": "independent11:deal_assignment_override",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "List every distinct Pipedrive people with an activity assigned to someone other than the owner of its deal. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT d.person_id AS user_id FROM pipedrive.activities a JOIN pipedrive.deals d ON d.id=a.deal_id WHERE a.assigned_to_user_id IS NOT NULL AND d.owner_id IS NOT NULL AND a.assigned_to_user_id<>d.owner_id ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:deal_assignment_override:t2",
          "intent_family": "independent11:deal_assignment_override",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "For exactly the Pipedrive people with an activity assigned to someone other than the owner of its deal in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT d.person_id AS user_id FROM pipedrive.activities a JOIN pipedrive.deals d ON d.id=a.deal_id WHERE a.assigned_to_user_id IS NOT NULL AND d.owner_id IS NOT NULL AND a.assigned_to_user_id<>d.owner_id) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:deal_assignment_override:t3",
          "intent_family": "independent11:deal_assignment_override",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Show the same checked IDs for the Pipedrive people with an activity assigned to someone other than the owner of its deal from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT d.person_id AS user_id FROM pipedrive.activities a JOIN pipedrive.deals d ON d.id=a.deal_id WHERE a.assigned_to_user_id IS NOT NULL AND d.owner_id IS NOT NULL AND a.assigned_to_user_id<>d.owner_id ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:deal_assignment_override:t4",
          "intent_family": "independent11:deal_assignment_override",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Keep the Pipedrive people with an activity assigned to someone other than the owner of its deal membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT d.person_id AS user_id FROM pipedrive.activities a JOIN pipedrive.deals d ON d.id=a.deal_id WHERE a.assigned_to_user_id IS NOT NULL AND d.owner_id IS NOT NULL AND a.assigned_to_user_id<>d.owner_id) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:note_author_deal_owner_difference:chain",
      "intent_family": "independent11:note_author_deal_owner_difference",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:note_author_deal_owner_difference:t1",
          "intent_family": "independent11:note_author_deal_owner_difference",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "List every distinct Pipedrive people with an active deal note authored by someone other than the deal owner. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT d.person_id AS user_id FROM pipedrive.notes n JOIN pipedrive.deals d ON d.id=n.deal_id WHERE n.active_flag IS TRUE AND n.author_user_id IS NOT NULL AND d.owner_id IS NOT NULL AND n.author_user_id<>d.owner_id ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:note_author_deal_owner_difference:t2",
          "intent_family": "independent11:note_author_deal_owner_difference",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "For exactly the Pipedrive people with an active deal note authored by someone other than the deal owner in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT d.person_id AS user_id FROM pipedrive.notes n JOIN pipedrive.deals d ON d.id=n.deal_id WHERE n.active_flag IS TRUE AND n.author_user_id IS NOT NULL AND d.owner_id IS NOT NULL AND n.author_user_id<>d.owner_id) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:note_author_deal_owner_difference:t3",
          "intent_family": "independent11:note_author_deal_owner_difference",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Show the same checked IDs for the Pipedrive people with an active deal note authored by someone other than the deal owner from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT d.person_id AS user_id FROM pipedrive.notes n JOIN pipedrive.deals d ON d.id=n.deal_id WHERE n.active_flag IS TRUE AND n.author_user_id IS NOT NULL AND d.owner_id IS NOT NULL AND n.author_user_id<>d.owner_id ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:note_author_deal_owner_difference:t4",
          "intent_family": "independent11:note_author_deal_owner_difference",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Keep the Pipedrive people with an active deal note authored by someone other than the deal owner membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT d.person_id AS user_id FROM pipedrive.notes n JOIN pipedrive.deals d ON d.id=n.deal_id WHERE n.active_flag IS TRUE AND n.author_user_id IS NOT NULL AND d.owner_id IS NOT NULL AND n.author_user_id<>d.owner_id) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:known_external_person_qualification:chain",
      "intent_family": "independent11:known_external_person_qualification",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:known_external_person_qualification:t1",
          "intent_family": "independent11:known_external_person_qualification",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "List every distinct Pipedrive people explicitly marked as non-employees whose lead qualification date follows their signup date. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p WHERE p.pd_is_ct_employee IS FALSE AND p.pd_lead_qualified_at>p.add_time::date ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:known_external_person_qualification:t2",
          "intent_family": "independent11:known_external_person_qualification",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "For exactly the Pipedrive people explicitly marked as non-employees whose lead qualification date follows their signup date in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p WHERE p.pd_is_ct_employee IS FALSE AND p.pd_lead_qualified_at>p.add_time::date) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:known_external_person_qualification:t3",
          "intent_family": "independent11:known_external_person_qualification",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Show the same checked IDs for the Pipedrive people explicitly marked as non-employees whose lead qualification date follows their signup date from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p WHERE p.pd_is_ct_employee IS FALSE AND p.pd_lead_qualified_at>p.add_time::date ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:known_external_person_qualification:t4",
          "intent_family": "independent11:known_external_person_qualification",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Keep the Pipedrive people explicitly marked as non-employees whose lead qualification date follows their signup date membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p WHERE p.pd_is_ct_employee IS FALSE AND p.pd_lead_qualified_at>p.add_time::date) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:organization_erp_multiple:chain",
      "intent_family": "independent11:organization_erp_multiple",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:organization_erp_multiple:t1",
          "intent_family": "independent11:organization_erp_multiple",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "List every distinct Pipedrive people whose organization names at least two ERP systems. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE CARDINALITY(o.cf_erp)>=2 ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:organization_erp_multiple:t2",
          "intent_family": "independent11:organization_erp_multiple",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "For exactly the Pipedrive people whose organization names at least two ERP systems in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE CARDINALITY(o.cf_erp)>=2) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:organization_erp_multiple:t3",
          "intent_family": "independent11:organization_erp_multiple",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Show the same checked IDs for the Pipedrive people whose organization names at least two ERP systems from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE CARDINALITY(o.cf_erp)>=2 ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:organization_erp_multiple:t4",
          "intent_family": "independent11:organization_erp_multiple",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Keep the Pipedrive people whose organization names at least two ERP systems membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE CARDINALITY(o.cf_erp)>=2) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:organization_wallet_share_unknown:chain",
      "intent_family": "independent11:organization_wallet_share_unknown",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:organization_wallet_share_unknown:t1",
          "intent_family": "independent11:organization_wallet_share_unknown",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "List every distinct Pipedrive people at an organization with a known service level but an unknown wallet-share value. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE o.cf_level_of_service IS NOT NULL AND o.cf_wallet_share IS NULL ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:organization_wallet_share_unknown:t2",
          "intent_family": "independent11:organization_wallet_share_unknown",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "For exactly the Pipedrive people at an organization with a known service level but an unknown wallet-share value in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE o.cf_level_of_service IS NOT NULL AND o.cf_wallet_share IS NULL) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:organization_wallet_share_unknown:t3",
          "intent_family": "independent11:organization_wallet_share_unknown",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Show the same checked IDs for the Pipedrive people at an organization with a known service level but an unknown wallet-share value from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE o.cf_level_of_service IS NOT NULL AND o.cf_wallet_share IS NULL ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:organization_wallet_share_unknown:t4",
          "intent_family": "independent11:organization_wallet_share_unknown",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Keep the Pipedrive people at an organization with a known service level but an unknown wallet-share value membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE o.cf_level_of_service IS NOT NULL AND o.cf_wallet_share IS NULL) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:activity_duration_missing_due_time:chain",
      "intent_family": "independent11:activity_duration_missing_due_time",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:activity_duration_missing_due_time:t1",
          "intent_family": "independent11:activity_duration_missing_due_time",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "List every distinct Pipedrive people with an activity that has a duration but no due time. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.person_id AS user_id FROM pipedrive.activities a WHERE a.duration IS NOT NULL AND a.due_time IS NULL ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:activity_duration_missing_due_time:t2",
          "intent_family": "independent11:activity_duration_missing_due_time",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "For exactly the Pipedrive people with an activity that has a duration but no due time in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.person_id AS user_id FROM pipedrive.activities a WHERE a.duration IS NOT NULL AND a.due_time IS NULL) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:activity_duration_missing_due_time:t3",
          "intent_family": "independent11:activity_duration_missing_due_time",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Show the same checked IDs for the Pipedrive people with an activity that has a duration but no due time from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT a.person_id AS user_id FROM pipedrive.activities a WHERE a.duration IS NOT NULL AND a.due_time IS NULL ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:activity_duration_missing_due_time:t4",
          "intent_family": "independent11:activity_duration_missing_due_time",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Keep the Pipedrive people with an activity that has a duration but no due time membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT a.person_id AS user_id FROM pipedrive.activities a WHERE a.duration IS NOT NULL AND a.due_time IS NULL) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:deal_stage_timestamp_order:chain",
      "intent_family": "independent11:deal_stage_timestamp_order",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:deal_stage_timestamp_order:t1",
          "intent_family": "independent11:deal_stage_timestamp_order",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "List every distinct Pipedrive people with a deal whose stage-change timestamp predates its creation timestamp. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT d.person_id AS user_id FROM pipedrive.deals d WHERE d.stage_change_time<d.add_time ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:deal_stage_timestamp_order:t2",
          "intent_family": "independent11:deal_stage_timestamp_order",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "For exactly the Pipedrive people with a deal whose stage-change timestamp predates its creation timestamp in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT d.person_id AS user_id FROM pipedrive.deals d WHERE d.stage_change_time<d.add_time) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:deal_stage_timestamp_order:t3",
          "intent_family": "independent11:deal_stage_timestamp_order",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Show the same checked IDs for the Pipedrive people with a deal whose stage-change timestamp predates its creation timestamp from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT d.person_id AS user_id FROM pipedrive.deals d WHERE d.stage_change_time<d.add_time ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:deal_stage_timestamp_order:t4",
          "intent_family": "independent11:deal_stage_timestamp_order",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Keep the Pipedrive people with a deal whose stage-change timestamp predates its creation timestamp membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT d.person_id AS user_id FROM pipedrive.deals d WHERE d.stage_change_time<d.add_time) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    },
    {
      "conversation_id": "independent11:organization_client_type_multiple:chain",
      "intent_family": "independent11:organization_client_type_multiple",
      "split": "locked_holdout",
      "turns": [
        {
          "case_id": "independent11:organization_client_type_multiple:t1",
          "intent_family": "independent11:organization_client_type_multiple",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "List every distinct Pipedrive people at an organization with more than one client-type tag. Return only user_id, in ascending order; use the person ID for a Pipedrive-only person.",
          "action": "query",
          "requires_parent": false,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE CARDINALITY(o.cf_client_type_tags)>1 ORDER BY user_id",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": false,
              "accepted_refusals": []
            }
          }
        },
        {
          "case_id": "independent11:organization_client_type_multiple:t2",
          "intent_family": "independent11:organization_client_type_multiple",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "For exactly the Pipedrive people at an organization with more than one client-type tag in the first checked result, return their distinct count as client_count. Keep that membership and return zero if it is empty.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE CARDINALITY(o.cf_client_type_tags)>1) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:organization_client_type_multiple:t3",
          "intent_family": "independent11:organization_client_type_multiple",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Show the same checked IDs for the Pipedrive people at an organization with more than one client-type tag from the first result, this time in descending user_id order. Keep every member and show only user_id.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "ordered",
            "sql": "SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE CARDINALITY(o.cf_client_type_tags)>1 ORDER BY user_id DESC",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "user_id",
                  "role": "identifier",
                  "aliases": [
                    "user_id",
                    "client_id",
                    "person_id",
                    "id"
                  ]
                }
              ],
              "ordered": true,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 0
        },
        {
          "case_id": "independent11:organization_client_type_multiple:t4",
          "intent_family": "independent11:organization_client_type_multiple",
          "split": "locked_holdout",
          "category": "membership",
          "supported": true,
          "connection": "gold",
          "nl_query": "Keep the Pipedrive people at an organization with more than one client-type tag membership from the third result and count those distinct IDs as client_count. An empty result counts as zero.",
          "action": "query",
          "requires_parent": true,
          "expected": {
            "mode": "scalar",
            "sql": "SELECT COUNT(*) AS client_count FROM (SELECT DISTINCT p.id AS user_id FROM pipedrive.persons_enriched p JOIN pipedrive.organizations o ON o.id=p.org_id WHERE CARDINALITY(o.cf_client_type_tags)>1) cohort",
            "contract": {
              "version": 11,
              "fields": [
                {
                  "name": "client_count",
                  "role": "count",
                  "aliases": [
                    "client_count",
                    "count",
                    "total_clients",
                    "user_count",
                    "person_count"
                  ]
                }
              ],
              "ordered": false,
              "complete_membership": true,
              "ambiguity": "none",
              "requires_parent": true,
              "accepted_refusals": []
            }
          },
          "parent_index": 2
        }
      ]
    }
  ]
}
