Add files using upload-large-folder tool
Browse files- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_019d6b006b7de3e4.sql +44 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_01f8f62bb942df9d.sql +21 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_041eea874a44681c.sql +19 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_15628bec73cabaf8.sql +17 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_19d03d4f1d508ed6.sql +21 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_1aff4a586c76799d.sql +17 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_1d27aef1d815a727.sql +28 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_1d4ce0eeb4098eeb.sql +26 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_23415a19338ee319.sql +31 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_2751bb833571d67f.sql +18 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_29aa22298293aff9.sql +18 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_29c3334dc72379f4.sql +21 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_37d13cca1af19797.sql +32 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_412e9773bf999b35.sql +22 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_4233fe3c8436bcd8.sql +25 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_485e4343cfc1f79f.sql +28 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_4a0716fae9aed734.sql +21 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_4a1623ad65143456.sql +22 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_51c88423be97b312.sql +36 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_539fbbe29c9bf445.sql +18 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_5fd13437844dac28.sql +18 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_70e3793a92badea3.sql +20 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_73af2ff87a5ac26b.sql +18 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_7b44ae5134a33318.sql +18 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_7ceb8f3d7519c837.sql +18 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_7ede6dcf0a76bef1.sql +25 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_836cbef7b2b70726.sql +25 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_83ac6e96b3ed24a7.sql +18 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_8562d505aa4e4864.sql +21 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_86fd21f946d9e610.sql +23 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_8db0770341684d46.sql +28 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_8f221a91bcf865bc.sql +21 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_96e523796a209ada.sql +22 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_a18eb166b2ecacc1.sql +22 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_a2221fa5fa33af5f.sql +18 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_b1b39bd682a5e334.sql +15 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_b6ca8f85b6355900.sql +28 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_bdbaafed349bb2f8.sql +24 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_bfbf733312b6b830.sql +18 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_c1a942495c2ed755.sql +21 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_cbc1188c1209ae6c.sql +21 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_cc557b0b39c81e50.sql +21 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_d0c7fb0aeffa205c.sql +32 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_db188f60e638c843.sql +15 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_dfbd2f68b99bcdd8.sql +26 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_e27b0726bb17cf20.sql +25 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_e44302143ddafe6f.sql +18 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_ebfa7172187b0f67.sql +26 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_ed9ec34048a49f07.sql +20 -0
- Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_efec7032d628cacb.sql +30 -0
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_019d6b006b7de3e4.sql
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: tail_rarity_structure
|
| 6 |
+
-- canonical_subitem_id: tail_concentration_consistency
|
| 7 |
+
-- intended_facet_id: rare_target_concentration
|
| 8 |
+
-- variant_semantic_role: focused_target_view
|
| 9 |
+
-- template_id: tpl_grouped_percentile_point
|
| 10 |
+
-- query_record_id: v2q_m12_019d6b006b7de3e4
|
| 11 |
+
-- problem_id: v2p_m12_3441c9281f38766d
|
| 12 |
+
-- realization_mode: agent
|
| 13 |
+
-- source_kind: agent
|
| 14 |
+
WITH "ranked" AS (
|
| 15 |
+
SELECT
|
| 16 |
+
"arrival_date_year",
|
| 17 |
+
CAST("lead_time" AS REAL) AS "lead_time_value",
|
| 18 |
+
ROW_NUMBER() OVER (
|
| 19 |
+
PARTITION BY "arrival_date_year"
|
| 20 |
+
ORDER BY CAST("lead_time" AS REAL)
|
| 21 |
+
) AS "rn",
|
| 22 |
+
COUNT(*) OVER (PARTITION BY "arrival_date_year") AS "cnt"
|
| 23 |
+
FROM "m12"
|
| 24 |
+
WHERE "arrival_date_year" IS NOT NULL
|
| 25 |
+
AND TRIM("arrival_date_year") <> ''
|
| 26 |
+
AND "lead_time" IS NOT NULL
|
| 27 |
+
AND TRIM("lead_time") <> ''
|
| 28 |
+
),
|
| 29 |
+
"thresholded" AS (
|
| 30 |
+
SELECT
|
| 31 |
+
"arrival_date_year",
|
| 32 |
+
"lead_time_value",
|
| 33 |
+
"rn",
|
| 34 |
+
"cnt",
|
| 35 |
+
CAST(((95 * "cnt") + 99) / 100 AS INTEGER) AS "target_rn"
|
| 36 |
+
FROM "ranked"
|
| 37 |
+
)
|
| 38 |
+
SELECT
|
| 39 |
+
"arrival_date_year",
|
| 40 |
+
MIN("lead_time_value") AS "percentile_measure"
|
| 41 |
+
FROM "thresholded"
|
| 42 |
+
WHERE "rn" >= "target_rn"
|
| 43 |
+
GROUP BY "arrival_date_year"
|
| 44 |
+
ORDER BY "percentile_measure" DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_01f8f62bb942df9d.sql
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: missingness_structure
|
| 6 |
+
-- canonical_subitem_id: co_missingness_pattern_consistency
|
| 7 |
+
-- intended_facet_id: missing_target_interaction
|
| 8 |
+
-- variant_semantic_role: missing_target_interaction
|
| 9 |
+
-- template_id: tpl_missing_target_interaction
|
| 10 |
+
-- query_record_id: v2q_m12_01f8f62bb942df9d
|
| 11 |
+
-- problem_id: v2p_m12_6f15a88d7cc1ef51
|
| 12 |
+
-- realization_mode: deterministic
|
| 13 |
+
-- source_kind: deterministic
|
| 14 |
+
SELECT
|
| 15 |
+
"customer_type",
|
| 16 |
+
COUNT(*) AS total_rows,
|
| 17 |
+
SUM(CASE WHEN "agent" IS NULL THEN 1 ELSE 0 END) AS missing_rows,
|
| 18 |
+
AVG(CASE WHEN "agent" IS NULL THEN 1.0 ELSE 0.0 END) AS missing_rate
|
| 19 |
+
FROM "m12"
|
| 20 |
+
GROUP BY "customer_type"
|
| 21 |
+
ORDER BY missing_rate DESC, total_rows DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_041eea874a44681c.sql
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: conditional_dependency_structure
|
| 6 |
+
-- canonical_subitem_id: dependency_strength_similarity
|
| 7 |
+
-- intended_facet_id: pairwise_conditional_dependency
|
| 8 |
+
-- variant_semantic_role: within_group_proportion
|
| 9 |
+
-- template_id: tpl_tpcds_within_group_share
|
| 10 |
+
-- query_record_id: v2q_m12_041eea874a44681c
|
| 11 |
+
-- problem_id: v2p_m12_9e3be1f553bfd074
|
| 12 |
+
-- realization_mode: agent
|
| 13 |
+
-- source_kind: agent
|
| 14 |
+
SELECT "arrival_date_month", "company",
|
| 15 |
+
SUM(CAST("arrival_date_day_of_month" AS INTEGER)) AS total_measure,
|
| 16 |
+
SUM(CAST("arrival_date_day_of_month" AS INTEGER)) * 100.0 / SUM(SUM(CAST("arrival_date_day_of_month" AS INTEGER))) OVER (PARTITION BY "arrival_date_month") AS share_within_group
|
| 17 |
+
FROM "m12"
|
| 18 |
+
GROUP BY "arrival_date_month", "company"
|
| 19 |
+
ORDER BY share_within_group DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_15628bec73cabaf8.sql
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: subgroup_structure
|
| 6 |
+
-- canonical_subitem_id: subgroup_size_stability
|
| 7 |
+
-- intended_facet_id: subgroup_distribution_shift
|
| 8 |
+
-- variant_semantic_role: count_distribution
|
| 9 |
+
-- template_id: tpl_clickbench_group_count
|
| 10 |
+
-- query_record_id: v2q_m12_15628bec73cabaf8
|
| 11 |
+
-- problem_id: v2p_m12_cc215be68faf322a
|
| 12 |
+
-- realization_mode: agent
|
| 13 |
+
-- source_kind: agent
|
| 14 |
+
SELECT "distribution_channel", COUNT(*) AS "row_count"
|
| 15 |
+
FROM "m12"
|
| 16 |
+
GROUP BY "distribution_channel"
|
| 17 |
+
ORDER BY "row_count" DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_19d03d4f1d508ed6.sql
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: cardinality_structure
|
| 6 |
+
-- canonical_subitem_id: high_cardinality_response_stability
|
| 7 |
+
-- intended_facet_id: target_cardinality_cross_section
|
| 8 |
+
-- variant_semantic_role: focused_target_view
|
| 9 |
+
-- template_id: tpl_cardinality_high_card_response_stability
|
| 10 |
+
-- query_record_id: v2q_m12_19d03d4f1d508ed6
|
| 11 |
+
-- problem_id: v2p_m12_f3fe324a169a8fbe
|
| 12 |
+
-- realization_mode: deterministic
|
| 13 |
+
-- source_kind: deterministic
|
| 14 |
+
SELECT
|
| 15 |
+
"booking_changes",
|
| 16 |
+
COUNT(*) AS support,
|
| 17 |
+
AVG("arrival_date_year") AS avg_response
|
| 18 |
+
FROM "m12"
|
| 19 |
+
GROUP BY "booking_changes"
|
| 20 |
+
HAVING COUNT(*) >= 5.0
|
| 21 |
+
ORDER BY support DESC, avg_response DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_1aff4a586c76799d.sql
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: subgroup_structure
|
| 6 |
+
-- canonical_subitem_id: internal_profile_stability
|
| 7 |
+
-- intended_facet_id: subgroup_rank_order
|
| 8 |
+
-- variant_semantic_role: collapsed_target_view
|
| 9 |
+
-- template_id: tpl_h2o_group_sum
|
| 10 |
+
-- query_record_id: v2q_m12_1aff4a586c76799d
|
| 11 |
+
-- problem_id: v2p_m12_7a807ad4c10dd82b
|
| 12 |
+
-- realization_mode: agent
|
| 13 |
+
-- source_kind: agent
|
| 14 |
+
SELECT "hotel", SUM(CAST(NULLIF("lead_time", '') AS NUMERIC)) AS "total_measure"
|
| 15 |
+
FROM "m12"
|
| 16 |
+
GROUP BY "hotel"
|
| 17 |
+
ORDER BY "total_measure" DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_1d27aef1d815a727.sql
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: cardinality_structure
|
| 6 |
+
-- canonical_subitem_id: support_rank_profile_consistency
|
| 7 |
+
-- intended_facet_id: value_imbalance_profile
|
| 8 |
+
-- variant_semantic_role: ranked_signal_view
|
| 9 |
+
-- template_id: tpl_cardinality_distinct_share_profile
|
| 10 |
+
-- query_record_id: v2q_m12_1d27aef1d815a727
|
| 11 |
+
-- problem_id: v2p_m12_82ab851925b31eb2
|
| 12 |
+
-- realization_mode: deterministic
|
| 13 |
+
-- source_kind: deterministic
|
| 14 |
+
WITH grouped AS (
|
| 15 |
+
SELECT "lead_time" AS value_label, COUNT(*) AS support
|
| 16 |
+
FROM "m12"
|
| 17 |
+
GROUP BY "lead_time"
|
| 18 |
+
), ranked AS (
|
| 19 |
+
SELECT
|
| 20 |
+
value_label,
|
| 21 |
+
support,
|
| 22 |
+
CAST(support AS FLOAT) / NULLIF(SUM(support) OVER (), 0) AS support_share,
|
| 23 |
+
SUM(support) OVER (ORDER BY support DESC, value_label ROWS UNBOUNDED PRECEDING) AS cumulative_support
|
| 24 |
+
FROM grouped
|
| 25 |
+
)
|
| 26 |
+
SELECT *
|
| 27 |
+
FROM ranked
|
| 28 |
+
ORDER BY support DESC, value_label;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_1d4ce0eeb4098eeb.sql
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: tail_rarity_structure
|
| 6 |
+
-- canonical_subitem_id: tail_mass_similarity
|
| 7 |
+
-- intended_facet_id: tail_ranked_signal
|
| 8 |
+
-- variant_semantic_role: count_distribution
|
| 9 |
+
-- template_id: tpl_tpch_relative_total_threshold
|
| 10 |
+
-- query_record_id: v2q_m12_1d4ce0eeb4098eeb
|
| 11 |
+
-- problem_id: v2p_m12_ace62cdcdc66a75e
|
| 12 |
+
-- realization_mode: agent
|
| 13 |
+
-- source_kind: agent
|
| 14 |
+
WITH "grouped" AS (
|
| 15 |
+
SELECT "hotel", SUM(CAST(NULLIF("days_in_waiting_list", '') AS REAL)) AS "group_value"
|
| 16 |
+
FROM "m12"
|
| 17 |
+
GROUP BY "hotel"
|
| 18 |
+
), "total" AS (
|
| 19 |
+
SELECT SUM("group_value") AS "total_value"
|
| 20 |
+
FROM "grouped"
|
| 21 |
+
)
|
| 22 |
+
SELECT g."hotel", g."group_value"
|
| 23 |
+
FROM "grouped" AS g
|
| 24 |
+
CROSS JOIN "total" AS t
|
| 25 |
+
WHERE g."group_value" > t."total_value" * 0.05
|
| 26 |
+
ORDER BY g."group_value" DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_23415a19338ee319.sql
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: tail_rarity_structure
|
| 6 |
+
-- canonical_subitem_id: tail_mass_similarity
|
| 7 |
+
-- intended_facet_id: tail_ranked_signal
|
| 8 |
+
-- variant_semantic_role: filtered_stable_view
|
| 9 |
+
-- template_id: tpl_tpch_relative_total_threshold
|
| 10 |
+
-- query_record_id: v2q_m12_23415a19338ee319
|
| 11 |
+
-- problem_id: v2p_m12_d0d9e43452911210
|
| 12 |
+
-- realization_mode: agent
|
| 13 |
+
-- source_kind: agent
|
| 14 |
+
WITH "grouped" AS (
|
| 15 |
+
SELECT
|
| 16 |
+
"hotel",
|
| 17 |
+
SUM(CAST(COALESCE(NULLIF("days_in_waiting_list", ''), '0') AS REAL)) AS "group_value"
|
| 18 |
+
FROM "m12"
|
| 19 |
+
GROUP BY "hotel"
|
| 20 |
+
),
|
| 21 |
+
"total" AS (
|
| 22 |
+
SELECT SUM("group_value") AS "total_value"
|
| 23 |
+
FROM "grouped"
|
| 24 |
+
)
|
| 25 |
+
SELECT
|
| 26 |
+
g."hotel",
|
| 27 |
+
g."group_value"
|
| 28 |
+
FROM "grouped" AS g
|
| 29 |
+
CROSS JOIN "total" AS t
|
| 30 |
+
WHERE g."group_value" > t."total_value" * 0.1
|
| 31 |
+
ORDER BY g."group_value" DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_2751bb833571d67f.sql
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: conditional_dependency_structure
|
| 6 |
+
-- canonical_subitem_id: dependency_strength_similarity
|
| 7 |
+
-- intended_facet_id: pairwise_conditional_dependency
|
| 8 |
+
-- variant_semantic_role: focused_target_view
|
| 9 |
+
-- template_id: tpl_m4_group_condition_rate
|
| 10 |
+
-- query_record_id: v2q_m12_2751bb833571d67f
|
| 11 |
+
-- problem_id: v2p_m12_59a450013ad97cb2
|
| 12 |
+
-- realization_mode: agent
|
| 13 |
+
-- source_kind: agent
|
| 14 |
+
SELECT "is_repeated_guest",
|
| 15 |
+
AVG(CASE WHEN "total_of_special_requests" = '1' THEN 1 ELSE 0 END) AS condition_rate
|
| 16 |
+
FROM "m12"
|
| 17 |
+
GROUP BY "is_repeated_guest"
|
| 18 |
+
ORDER BY condition_rate DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_29aa22298293aff9.sql
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: conditional_dependency_structure
|
| 6 |
+
-- canonical_subitem_id: slice_level_consistency
|
| 7 |
+
-- intended_facet_id: conditional_interaction_hotspots
|
| 8 |
+
-- variant_semantic_role: count_distribution
|
| 9 |
+
-- template_id: tpl_c2_filtered_group_count_2d
|
| 10 |
+
-- query_record_id: v2q_m12_29aa22298293aff9
|
| 11 |
+
-- problem_id: v2p_m12_c304cbb317d99c71
|
| 12 |
+
-- realization_mode: agent
|
| 13 |
+
-- source_kind: agent
|
| 14 |
+
SELECT "lead_time", "arrival_date_day_of_month", COUNT(*) AS "row_count"
|
| 15 |
+
FROM "m12"
|
| 16 |
+
WHERE "deposit_type" = 'No Deposit'
|
| 17 |
+
GROUP BY "lead_time", "arrival_date_day_of_month"
|
| 18 |
+
ORDER BY "row_count" DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_29c3334dc72379f4.sql
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: missingness_structure
|
| 6 |
+
-- canonical_subitem_id: co_missingness_pattern_consistency
|
| 7 |
+
-- intended_facet_id: missing_target_interaction
|
| 8 |
+
-- variant_semantic_role: missing_target_interaction
|
| 9 |
+
-- template_id: tpl_missing_target_interaction
|
| 10 |
+
-- query_record_id: v2q_m12_29c3334dc72379f4
|
| 11 |
+
-- problem_id: v2p_m12_701c4329297032cc
|
| 12 |
+
-- realization_mode: deterministic
|
| 13 |
+
-- source_kind: deterministic
|
| 14 |
+
SELECT
|
| 15 |
+
"market_segment",
|
| 16 |
+
COUNT(*) AS total_rows,
|
| 17 |
+
SUM(CASE WHEN "agent" IS NULL THEN 1 ELSE 0 END) AS missing_rows,
|
| 18 |
+
AVG(CASE WHEN "agent" IS NULL THEN 1.0 ELSE 0.0 END) AS missing_rate
|
| 19 |
+
FROM "m12"
|
| 20 |
+
GROUP BY "market_segment"
|
| 21 |
+
ORDER BY missing_rate DESC, total_rows DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_37d13cca1af19797.sql
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: tail_rarity_structure
|
| 6 |
+
-- canonical_subitem_id: tail_mass_similarity
|
| 7 |
+
-- intended_facet_id: tail_ranked_signal
|
| 8 |
+
-- variant_semantic_role: filtered_stable_view
|
| 9 |
+
-- template_id: tpl_tpch_relative_total_threshold
|
| 10 |
+
-- query_record_id: v2q_m12_37d13cca1af19797
|
| 11 |
+
-- problem_id: v2p_m12_e13ee6c3a1167e79
|
| 12 |
+
-- realization_mode: agent
|
| 13 |
+
-- source_kind: agent
|
| 14 |
+
WITH "grouped" AS (
|
| 15 |
+
SELECT
|
| 16 |
+
"booking_changes",
|
| 17 |
+
SUM(CAST(NULLIF("arrival_date_day_of_month", '') AS REAL)) AS "group_value"
|
| 18 |
+
FROM "m12"
|
| 19 |
+
WHERE NULLIF("booking_changes", '') IS NOT NULL
|
| 20 |
+
AND NULLIF("arrival_date_day_of_month", '') IS NOT NULL
|
| 21 |
+
GROUP BY "booking_changes"
|
| 22 |
+
), "total" AS (
|
| 23 |
+
SELECT SUM("group_value") AS "total_value"
|
| 24 |
+
FROM "grouped"
|
| 25 |
+
)
|
| 26 |
+
SELECT
|
| 27 |
+
g."booking_changes",
|
| 28 |
+
g."group_value"
|
| 29 |
+
FROM "grouped" AS g
|
| 30 |
+
CROSS JOIN "total" AS t
|
| 31 |
+
WHERE g."group_value" > t."total_value" * 0.1
|
| 32 |
+
ORDER BY g."group_value" DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_412e9773bf999b35.sql
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: conditional_dependency_structure
|
| 6 |
+
-- canonical_subitem_id: dependency_strength_similarity
|
| 7 |
+
-- intended_facet_id: pairwise_conditional_dependency
|
| 8 |
+
-- variant_semantic_role: focused_target_view
|
| 9 |
+
-- template_id: tpl_tpcds_within_group_share
|
| 10 |
+
-- query_record_id: v2q_m12_412e9773bf999b35
|
| 11 |
+
-- problem_id: v2p_m12_db523d5a5a77e0f3
|
| 12 |
+
-- realization_mode: agent
|
| 13 |
+
-- source_kind: agent
|
| 14 |
+
SELECT
|
| 15 |
+
"lead_time",
|
| 16 |
+
"booking_changes",
|
| 17 |
+
SUM(CAST(NULLIF("arrival_date_year", '') AS REAL)) AS total_measure,
|
| 18 |
+
SUM(CAST(NULLIF("arrival_date_year", '') AS REAL)) * 100.0
|
| 19 |
+
/ SUM(SUM(CAST(NULLIF("arrival_date_year", '') AS REAL))) OVER (PARTITION BY "lead_time") AS share_within_group
|
| 20 |
+
FROM "m12"
|
| 21 |
+
GROUP BY "lead_time", "booking_changes"
|
| 22 |
+
ORDER BY share_within_group DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_4233fe3c8436bcd8.sql
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: cardinality_structure
|
| 6 |
+
-- canonical_subitem_id: support_rank_profile_consistency
|
| 7 |
+
-- intended_facet_id: support_concentration
|
| 8 |
+
-- variant_semantic_role: count_distribution
|
| 9 |
+
-- template_id: tpl_cardinality_support_rank_profile
|
| 10 |
+
-- query_record_id: v2q_m12_4233fe3c8436bcd8
|
| 11 |
+
-- problem_id: v2p_m12_0f50aec945f141a8
|
| 12 |
+
-- realization_mode: deterministic
|
| 13 |
+
-- source_kind: deterministic
|
| 14 |
+
WITH grouped AS (
|
| 15 |
+
SELECT "hotel" AS value_label, COUNT(*) AS support
|
| 16 |
+
FROM "m12"
|
| 17 |
+
GROUP BY "hotel"
|
| 18 |
+
)
|
| 19 |
+
SELECT
|
| 20 |
+
value_label,
|
| 21 |
+
support,
|
| 22 |
+
CAST(support AS FLOAT) / NULLIF(SUM(support) OVER (), 0) AS support_share,
|
| 23 |
+
ROW_NUMBER() OVER (ORDER BY support DESC, value_label) AS support_rank
|
| 24 |
+
FROM grouped
|
| 25 |
+
ORDER BY support DESC, value_label;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_485e4343cfc1f79f.sql
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: cardinality_structure
|
| 6 |
+
-- canonical_subitem_id: support_rank_profile_consistency
|
| 7 |
+
-- intended_facet_id: support_concentration
|
| 8 |
+
-- variant_semantic_role: ranked_signal_view
|
| 9 |
+
-- template_id: tpl_cardinality_distinct_share_profile
|
| 10 |
+
-- query_record_id: v2q_m12_485e4343cfc1f79f
|
| 11 |
+
-- problem_id: v2p_m12_1ce386f53b82ccf2
|
| 12 |
+
-- realization_mode: deterministic
|
| 13 |
+
-- source_kind: deterministic
|
| 14 |
+
WITH grouped AS (
|
| 15 |
+
SELECT "hotel" AS value_label, COUNT(*) AS support
|
| 16 |
+
FROM "m12"
|
| 17 |
+
GROUP BY "hotel"
|
| 18 |
+
), ranked AS (
|
| 19 |
+
SELECT
|
| 20 |
+
value_label,
|
| 21 |
+
support,
|
| 22 |
+
CAST(support AS FLOAT) / NULLIF(SUM(support) OVER (), 0) AS support_share,
|
| 23 |
+
SUM(support) OVER (ORDER BY support DESC, value_label ROWS UNBOUNDED PRECEDING) AS cumulative_support
|
| 24 |
+
FROM grouped
|
| 25 |
+
)
|
| 26 |
+
SELECT *
|
| 27 |
+
FROM ranked
|
| 28 |
+
ORDER BY support DESC, value_label;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_4a0716fae9aed734.sql
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: missingness_structure
|
| 6 |
+
-- canonical_subitem_id: co_missingness_pattern_consistency
|
| 7 |
+
-- intended_facet_id: missing_rate_by_subgroup
|
| 8 |
+
-- variant_semantic_role: missing_rate_by_subgroup
|
| 9 |
+
-- template_id: tpl_missing_rate_by_subgroup
|
| 10 |
+
-- query_record_id: v2q_m12_4a0716fae9aed734
|
| 11 |
+
-- problem_id: v2p_m12_1450b1e88209871f
|
| 12 |
+
-- realization_mode: deterministic
|
| 13 |
+
-- source_kind: deterministic
|
| 14 |
+
SELECT
|
| 15 |
+
"hotel",
|
| 16 |
+
COUNT(*) AS total_rows,
|
| 17 |
+
SUM(CASE WHEN "company" IS NULL THEN 1 ELSE 0 END) AS missing_rows,
|
| 18 |
+
AVG(CASE WHEN "company" IS NULL THEN 1.0 ELSE 0.0 END) AS missing_rate
|
| 19 |
+
FROM "m12"
|
| 20 |
+
GROUP BY "hotel"
|
| 21 |
+
ORDER BY missing_rate DESC, total_rows DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_4a1623ad65143456.sql
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: conditional_dependency_structure
|
| 6 |
+
-- canonical_subitem_id: dependency_strength_similarity
|
| 7 |
+
-- intended_facet_id: pairwise_conditional_dependency
|
| 8 |
+
-- variant_semantic_role: within_group_proportion
|
| 9 |
+
-- template_id: tpl_tpcds_within_group_share
|
| 10 |
+
-- query_record_id: v2q_m12_4a1623ad65143456
|
| 11 |
+
-- problem_id: v2p_m12_54e4003df6c89d54
|
| 12 |
+
-- realization_mode: agent
|
| 13 |
+
-- source_kind: agent
|
| 14 |
+
SELECT
|
| 15 |
+
"arrival_date_week_number",
|
| 16 |
+
"days_in_waiting_list",
|
| 17 |
+
SUM(CAST("stays_in_weekend_nights" AS REAL)) AS total_measure,
|
| 18 |
+
SUM(CAST("stays_in_weekend_nights" AS REAL)) * 100.0
|
| 19 |
+
/ NULLIF(SUM(SUM(CAST("stays_in_weekend_nights" AS REAL))) OVER (PARTITION BY "arrival_date_week_number"), 0) AS share_within_group
|
| 20 |
+
FROM "m12"
|
| 21 |
+
GROUP BY "arrival_date_week_number", "days_in_waiting_list"
|
| 22 |
+
ORDER BY share_within_group DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_51c88423be97b312.sql
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: tail_rarity_structure
|
| 6 |
+
-- canonical_subitem_id: tail_concentration_consistency
|
| 7 |
+
-- intended_facet_id: rare_target_concentration
|
| 8 |
+
-- variant_semantic_role: focused_target_view
|
| 9 |
+
-- template_id: tpl_grouped_percentile_point
|
| 10 |
+
-- query_record_id: v2q_m12_51c88423be97b312
|
| 11 |
+
-- problem_id: v2p_m12_eb1f6ad5fd326a63
|
| 12 |
+
-- realization_mode: agent
|
| 13 |
+
-- source_kind: agent
|
| 14 |
+
WITH "ranked" AS (
|
| 15 |
+
SELECT
|
| 16 |
+
"meal",
|
| 17 |
+
CAST(NULLIF(TRIM("agent"), '') AS REAL) AS "agent_value",
|
| 18 |
+
ROW_NUMBER() OVER (
|
| 19 |
+
PARTITION BY "meal"
|
| 20 |
+
ORDER BY CAST(NULLIF(TRIM("agent"), '') AS REAL)
|
| 21 |
+
) AS "rn",
|
| 22 |
+
COUNT(*) OVER (PARTITION BY "meal") AS "cnt"
|
| 23 |
+
FROM "m12"
|
| 24 |
+
WHERE NULLIF(TRIM("agent"), '') IS NOT NULL
|
| 25 |
+
),
|
| 26 |
+
"eligible" AS (
|
| 27 |
+
SELECT *
|
| 28 |
+
FROM "ranked"
|
| 29 |
+
WHERE "cnt" >= 5
|
| 30 |
+
)
|
| 31 |
+
SELECT
|
| 32 |
+
"meal",
|
| 33 |
+
"agent_value" AS "percentile_measure"
|
| 34 |
+
FROM "eligible"
|
| 35 |
+
WHERE "rn" = ((95 * "cnt" + 99) / 100)
|
| 36 |
+
ORDER BY "percentile_measure" DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_539fbbe29c9bf445.sql
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: conditional_dependency_structure
|
| 6 |
+
-- canonical_subitem_id: slice_level_consistency
|
| 7 |
+
-- intended_facet_id: conditional_interaction_hotspots
|
| 8 |
+
-- variant_semantic_role: count_distribution
|
| 9 |
+
-- template_id: tpl_c2_filtered_group_count_2d
|
| 10 |
+
-- query_record_id: v2q_m12_539fbbe29c9bf445
|
| 11 |
+
-- problem_id: v2p_m12_87bf68930884611a
|
| 12 |
+
-- realization_mode: agent
|
| 13 |
+
-- source_kind: agent
|
| 14 |
+
SELECT "lead_time", "stays_in_weekend_nights", COUNT(*) AS "row_count"
|
| 15 |
+
FROM "m12"
|
| 16 |
+
WHERE CAST("agent" AS REAL) >= 170.0
|
| 17 |
+
GROUP BY "lead_time", "stays_in_weekend_nights"
|
| 18 |
+
ORDER BY "row_count" DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_5fd13437844dac28.sql
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: conditional_dependency_structure
|
| 6 |
+
-- canonical_subitem_id: direction_consistency
|
| 7 |
+
-- intended_facet_id: conditional_rate_shift
|
| 8 |
+
-- variant_semantic_role: focused_target_view
|
| 9 |
+
-- template_id: tpl_m4_group_condition_rate
|
| 10 |
+
-- query_record_id: v2q_m12_5fd13437844dac28
|
| 11 |
+
-- problem_id: v2p_m12_45b6c5b7e327d40d
|
| 12 |
+
-- realization_mode: agent
|
| 13 |
+
-- source_kind: agent
|
| 14 |
+
SELECT "assigned_room_type",
|
| 15 |
+
AVG(CASE WHEN "is_canceled" = '0' THEN 1 ELSE 0 END) AS condition_rate
|
| 16 |
+
FROM "m12"
|
| 17 |
+
GROUP BY "assigned_room_type"
|
| 18 |
+
ORDER BY condition_rate DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_70e3793a92badea3.sql
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: conditional_dependency_structure
|
| 6 |
+
-- canonical_subitem_id: dependency_strength_similarity
|
| 7 |
+
-- intended_facet_id: pairwise_conditional_dependency
|
| 8 |
+
-- variant_semantic_role: focused_target_view
|
| 9 |
+
-- template_id: tpl_tpcds_within_group_share
|
| 10 |
+
-- query_record_id: v2q_m12_70e3793a92badea3
|
| 11 |
+
-- problem_id: v2p_m12_8d96567f7958fe2b
|
| 12 |
+
-- realization_mode: agent
|
| 13 |
+
-- source_kind: agent
|
| 14 |
+
SELECT "total_of_special_requests", "arrival_date_day_of_month",
|
| 15 |
+
SUM(CAST(COALESCE(NULLIF("days_in_waiting_list", ''), '0') AS REAL)) AS total_measure,
|
| 16 |
+
SUM(CAST(COALESCE(NULLIF("days_in_waiting_list", ''), '0') AS REAL)) * 100.0
|
| 17 |
+
/ SUM(SUM(CAST(COALESCE(NULLIF("days_in_waiting_list", ''), '0') AS REAL))) OVER (PARTITION BY "total_of_special_requests") AS share_within_group
|
| 18 |
+
FROM "m12"
|
| 19 |
+
GROUP BY "total_of_special_requests", "arrival_date_day_of_month"
|
| 20 |
+
ORDER BY share_within_group DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_73af2ff87a5ac26b.sql
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: conditional_dependency_structure
|
| 6 |
+
-- canonical_subitem_id: direction_consistency
|
| 7 |
+
-- intended_facet_id: conditional_rate_shift
|
| 8 |
+
-- variant_semantic_role: within_group_proportion
|
| 9 |
+
-- template_id: tpl_m4_group_condition_rate
|
| 10 |
+
-- query_record_id: v2q_m12_73af2ff87a5ac26b
|
| 11 |
+
-- problem_id: v2p_m12_7e1f9954cea55652
|
| 12 |
+
-- realization_mode: agent
|
| 13 |
+
-- source_kind: agent
|
| 14 |
+
SELECT "previous_cancellations",
|
| 15 |
+
AVG(CASE WHEN "reservation_status" = 'Canceled' THEN 1 ELSE 0 END) AS condition_rate
|
| 16 |
+
FROM "m12"
|
| 17 |
+
GROUP BY "previous_cancellations"
|
| 18 |
+
ORDER BY condition_rate DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_7b44ae5134a33318.sql
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: conditional_dependency_structure
|
| 6 |
+
-- canonical_subitem_id: slice_level_consistency
|
| 7 |
+
-- intended_facet_id: conditional_interaction_hotspots
|
| 8 |
+
-- variant_semantic_role: count_distribution
|
| 9 |
+
-- template_id: tpl_c2_filtered_group_count_2d
|
| 10 |
+
-- query_record_id: v2q_m12_7b44ae5134a33318
|
| 11 |
+
-- problem_id: v2p_m12_7459e35108029970
|
| 12 |
+
-- realization_mode: agent
|
| 13 |
+
-- source_kind: agent
|
| 14 |
+
SELECT "lead_time", "stays_in_week_nights", COUNT(*) AS row_count
|
| 15 |
+
FROM "m12"
|
| 16 |
+
WHERE CAST(NULLIF("company", '') AS REAL) >= 223.0
|
| 17 |
+
GROUP BY "lead_time", "stays_in_week_nights"
|
| 18 |
+
ORDER BY row_count DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_7ceb8f3d7519c837.sql
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: conditional_dependency_structure
|
| 6 |
+
-- canonical_subitem_id: dependency_strength_similarity
|
| 7 |
+
-- intended_facet_id: pairwise_conditional_dependency
|
| 8 |
+
-- variant_semantic_role: within_group_proportion
|
| 9 |
+
-- template_id: tpl_m4_group_condition_rate
|
| 10 |
+
-- query_record_id: v2q_m12_7ceb8f3d7519c837
|
| 11 |
+
-- problem_id: v2p_m12_e923d292e9a2e4a2
|
| 12 |
+
-- realization_mode: agent
|
| 13 |
+
-- source_kind: agent
|
| 14 |
+
SELECT "customer_type",
|
| 15 |
+
AVG(CASE WHEN "market_segment" = 'Offline TA/TO' THEN 1 ELSE 0 END) AS "condition_rate"
|
| 16 |
+
FROM "m12"
|
| 17 |
+
GROUP BY "customer_type"
|
| 18 |
+
ORDER BY "condition_rate" DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_7ede6dcf0a76bef1.sql
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: cardinality_structure
|
| 6 |
+
-- canonical_subitem_id: support_rank_profile_consistency
|
| 7 |
+
-- intended_facet_id: value_imbalance_profile
|
| 8 |
+
-- variant_semantic_role: count_distribution
|
| 9 |
+
-- template_id: tpl_cardinality_support_rank_profile
|
| 10 |
+
-- query_record_id: v2q_m12_7ede6dcf0a76bef1
|
| 11 |
+
-- problem_id: v2p_m12_5f5dc5ae8fea7e70
|
| 12 |
+
-- realization_mode: deterministic
|
| 13 |
+
-- source_kind: deterministic
|
| 14 |
+
WITH grouped AS (
|
| 15 |
+
SELECT "deposit_type" AS value_label, COUNT(*) AS support
|
| 16 |
+
FROM "m12"
|
| 17 |
+
GROUP BY "deposit_type"
|
| 18 |
+
)
|
| 19 |
+
SELECT
|
| 20 |
+
value_label,
|
| 21 |
+
support,
|
| 22 |
+
CAST(support AS FLOAT) / NULLIF(SUM(support) OVER (), 0) AS support_share,
|
| 23 |
+
ROW_NUMBER() OVER (ORDER BY support DESC, value_label) AS support_rank
|
| 24 |
+
FROM grouped
|
| 25 |
+
ORDER BY support DESC, value_label;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_836cbef7b2b70726.sql
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: cardinality_structure
|
| 6 |
+
-- canonical_subitem_id: support_rank_profile_consistency
|
| 7 |
+
-- intended_facet_id: support_concentration
|
| 8 |
+
-- variant_semantic_role: count_distribution
|
| 9 |
+
-- template_id: tpl_cardinality_support_rank_profile
|
| 10 |
+
-- query_record_id: v2q_m12_836cbef7b2b70726
|
| 11 |
+
-- problem_id: v2p_m12_1a4ab794a3f543c2
|
| 12 |
+
-- realization_mode: deterministic
|
| 13 |
+
-- source_kind: deterministic
|
| 14 |
+
WITH grouped AS (
|
| 15 |
+
SELECT "adults" AS value_label, COUNT(*) AS support
|
| 16 |
+
FROM "m12"
|
| 17 |
+
GROUP BY "adults"
|
| 18 |
+
)
|
| 19 |
+
SELECT
|
| 20 |
+
value_label,
|
| 21 |
+
support,
|
| 22 |
+
CAST(support AS FLOAT) / NULLIF(SUM(support) OVER (), 0) AS support_share,
|
| 23 |
+
ROW_NUMBER() OVER (ORDER BY support DESC, value_label) AS support_rank
|
| 24 |
+
FROM grouped
|
| 25 |
+
ORDER BY support DESC, value_label;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_83ac6e96b3ed24a7.sql
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: conditional_dependency_structure
|
| 6 |
+
-- canonical_subitem_id: dependency_strength_similarity
|
| 7 |
+
-- intended_facet_id: pairwise_conditional_dependency
|
| 8 |
+
-- variant_semantic_role: focused_target_view
|
| 9 |
+
-- template_id: tpl_m4_group_condition_rate
|
| 10 |
+
-- query_record_id: v2q_m12_83ac6e96b3ed24a7
|
| 11 |
+
-- problem_id: v2p_m12_71d53bd3522ee20d
|
| 12 |
+
-- realization_mode: agent
|
| 13 |
+
-- source_kind: agent
|
| 14 |
+
SELECT "booking_changes",
|
| 15 |
+
AVG(CASE WHEN "arrival_date_year" = '2017' THEN 1 ELSE 0 END) AS "condition_rate"
|
| 16 |
+
FROM "m12"
|
| 17 |
+
GROUP BY "booking_changes"
|
| 18 |
+
ORDER BY "condition_rate" DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_8562d505aa4e4864.sql
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: missingness_structure
|
| 6 |
+
-- canonical_subitem_id: co_missingness_pattern_consistency
|
| 7 |
+
-- intended_facet_id: missing_target_interaction
|
| 8 |
+
-- variant_semantic_role: missing_target_interaction
|
| 9 |
+
-- template_id: tpl_missing_target_interaction
|
| 10 |
+
-- query_record_id: v2q_m12_8562d505aa4e4864
|
| 11 |
+
-- problem_id: v2p_m12_411451924afd84e9
|
| 12 |
+
-- realization_mode: deterministic
|
| 13 |
+
-- source_kind: deterministic
|
| 14 |
+
SELECT
|
| 15 |
+
"customer_type",
|
| 16 |
+
COUNT(*) AS total_rows,
|
| 17 |
+
SUM(CASE WHEN "children" IS NULL THEN 1 ELSE 0 END) AS missing_rows,
|
| 18 |
+
AVG(CASE WHEN "children" IS NULL THEN 1.0 ELSE 0.0 END) AS missing_rate
|
| 19 |
+
FROM "m12"
|
| 20 |
+
GROUP BY "customer_type"
|
| 21 |
+
ORDER BY missing_rate DESC, total_rows DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_86fd21f946d9e610.sql
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: tail_rarity_structure
|
| 6 |
+
-- canonical_subitem_id: tail_set_consistency
|
| 7 |
+
-- intended_facet_id: low_support_extremes
|
| 8 |
+
-- variant_semantic_role: rare_extreme_view
|
| 9 |
+
-- template_id: tpl_m4_quantile_tail_slice
|
| 10 |
+
-- query_record_id: v2q_m12_86fd21f946d9e610
|
| 11 |
+
-- problem_id: v2p_m12_f421dd91addf2b0e
|
| 12 |
+
-- realization_mode: agent
|
| 13 |
+
-- source_kind: agent
|
| 14 |
+
WITH "buckets" AS (
|
| 15 |
+
SELECT
|
| 16 |
+
CAST("booking_changes" AS INTEGER) AS "booking_changes",
|
| 17 |
+
NTILE(10) OVER (ORDER BY CAST("booking_changes" AS INTEGER) DESC) AS "tail_bucket"
|
| 18 |
+
FROM "m12"
|
| 19 |
+
)
|
| 20 |
+
SELECT "booking_changes"
|
| 21 |
+
FROM "buckets"
|
| 22 |
+
WHERE "tail_bucket" = 1
|
| 23 |
+
ORDER BY "booking_changes" DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_8db0770341684d46.sql
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: cardinality_structure
|
| 6 |
+
-- canonical_subitem_id: support_rank_profile_consistency
|
| 7 |
+
-- intended_facet_id: value_imbalance_profile
|
| 8 |
+
-- variant_semantic_role: ranked_signal_view
|
| 9 |
+
-- template_id: tpl_cardinality_distinct_share_profile
|
| 10 |
+
-- query_record_id: v2q_m12_8db0770341684d46
|
| 11 |
+
-- problem_id: v2p_m12_d4c55b30af41073c
|
| 12 |
+
-- realization_mode: deterministic
|
| 13 |
+
-- source_kind: deterministic
|
| 14 |
+
WITH grouped AS (
|
| 15 |
+
SELECT "deposit_type" AS value_label, COUNT(*) AS support
|
| 16 |
+
FROM "m12"
|
| 17 |
+
GROUP BY "deposit_type"
|
| 18 |
+
), ranked AS (
|
| 19 |
+
SELECT
|
| 20 |
+
value_label,
|
| 21 |
+
support,
|
| 22 |
+
CAST(support AS FLOAT) / NULLIF(SUM(support) OVER (), 0) AS support_share,
|
| 23 |
+
SUM(support) OVER (ORDER BY support DESC, value_label ROWS UNBOUNDED PRECEDING) AS cumulative_support
|
| 24 |
+
FROM grouped
|
| 25 |
+
)
|
| 26 |
+
SELECT *
|
| 27 |
+
FROM ranked
|
| 28 |
+
ORDER BY support DESC, value_label;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_8f221a91bcf865bc.sql
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: missingness_structure
|
| 6 |
+
-- canonical_subitem_id: co_missingness_pattern_consistency
|
| 7 |
+
-- intended_facet_id: missing_target_interaction
|
| 8 |
+
-- variant_semantic_role: missing_target_interaction
|
| 9 |
+
-- template_id: tpl_missing_target_interaction
|
| 10 |
+
-- query_record_id: v2q_m12_8f221a91bcf865bc
|
| 11 |
+
-- problem_id: v2p_m12_f9f0782bfe9e4a34
|
| 12 |
+
-- realization_mode: deterministic
|
| 13 |
+
-- source_kind: deterministic
|
| 14 |
+
SELECT
|
| 15 |
+
"arrival_date_year",
|
| 16 |
+
COUNT(*) AS total_rows,
|
| 17 |
+
SUM(CASE WHEN "children" IS NULL THEN 1 ELSE 0 END) AS missing_rows,
|
| 18 |
+
AVG(CASE WHEN "children" IS NULL THEN 1.0 ELSE 0.0 END) AS missing_rate
|
| 19 |
+
FROM "m12"
|
| 20 |
+
GROUP BY "arrival_date_year"
|
| 21 |
+
ORDER BY missing_rate DESC, total_rows DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_96e523796a209ada.sql
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: conditional_dependency_structure
|
| 6 |
+
-- canonical_subitem_id: dependency_strength_similarity
|
| 7 |
+
-- intended_facet_id: pairwise_conditional_dependency
|
| 8 |
+
-- variant_semantic_role: focused_target_view
|
| 9 |
+
-- template_id: tpl_tpcds_within_group_share
|
| 10 |
+
-- query_record_id: v2q_m12_96e523796a209ada
|
| 11 |
+
-- problem_id: v2p_m12_de4b56cfef6678ff
|
| 12 |
+
-- realization_mode: agent
|
| 13 |
+
-- source_kind: agent
|
| 14 |
+
SELECT
|
| 15 |
+
"is_canceled",
|
| 16 |
+
"previous_bookings_not_canceled",
|
| 17 |
+
SUM(CAST(NULLIF("lead_time", '') AS REAL)) AS total_measure,
|
| 18 |
+
SUM(CAST(NULLIF("lead_time", '') AS REAL)) * 100.0 /
|
| 19 |
+
SUM(SUM(CAST(NULLIF("lead_time", '') AS REAL))) OVER (PARTITION BY "is_canceled") AS share_within_group
|
| 20 |
+
FROM "m12"
|
| 21 |
+
GROUP BY "is_canceled", "previous_bookings_not_canceled"
|
| 22 |
+
ORDER BY share_within_group DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_a18eb166b2ecacc1.sql
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: conditional_dependency_structure
|
| 6 |
+
-- canonical_subitem_id: dependency_strength_similarity
|
| 7 |
+
-- intended_facet_id: pairwise_conditional_dependency
|
| 8 |
+
-- variant_semantic_role: within_group_proportion
|
| 9 |
+
-- template_id: tpl_tpcds_within_group_share
|
| 10 |
+
-- query_record_id: v2q_m12_a18eb166b2ecacc1
|
| 11 |
+
-- problem_id: v2p_m12_87aed0df34cfa6b1
|
| 12 |
+
-- realization_mode: agent
|
| 13 |
+
-- source_kind: agent
|
| 14 |
+
SELECT
|
| 15 |
+
"arrival_date_day_of_month",
|
| 16 |
+
"adr",
|
| 17 |
+
SUM(CAST(NULLIF("stays_in_week_nights", '') AS REAL)) AS total_measure,
|
| 18 |
+
SUM(CAST(NULLIF("stays_in_week_nights", '') AS REAL)) * 100.0
|
| 19 |
+
/ SUM(SUM(CAST(NULLIF("stays_in_week_nights", '') AS REAL))) OVER (PARTITION BY "arrival_date_day_of_month") AS share_within_group
|
| 20 |
+
FROM "m12"
|
| 21 |
+
GROUP BY "arrival_date_day_of_month", "adr"
|
| 22 |
+
ORDER BY share_within_group DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_a2221fa5fa33af5f.sql
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: missingness_structure
|
| 6 |
+
-- canonical_subitem_id: marginal_missing_rate_consistency
|
| 7 |
+
-- intended_facet_id: missing_indicator_distribution
|
| 8 |
+
-- variant_semantic_role: missing_indicator_view
|
| 9 |
+
-- template_id: tpl_missing_marginal_rate_profile
|
| 10 |
+
-- query_record_id: v2q_m12_a2221fa5fa33af5f
|
| 11 |
+
-- problem_id: v2p_m12_09f7cc99790fac9d
|
| 12 |
+
-- realization_mode: deterministic
|
| 13 |
+
-- source_kind: deterministic
|
| 14 |
+
SELECT
|
| 15 |
+
COUNT(*) AS total_rows,
|
| 16 |
+
SUM(CASE WHEN "company" IS NULL THEN 1 ELSE 0 END) AS missing_rows,
|
| 17 |
+
AVG(CASE WHEN "company" IS NULL THEN 1.0 ELSE 0.0 END) AS missing_rate
|
| 18 |
+
FROM "m12";
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_b1b39bd682a5e334.sql
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: tail_rarity_structure
|
| 6 |
+
-- canonical_subitem_id: tail_set_consistency
|
| 7 |
+
-- intended_facet_id: low_support_extremes
|
| 8 |
+
-- variant_semantic_role: rare_extreme_view
|
| 9 |
+
-- template_id: tpl_threshold_rarity_cdf
|
| 10 |
+
-- query_record_id: v2q_m12_b1b39bd682a5e334
|
| 11 |
+
-- problem_id: v2p_m12_d8f87344b8f0e9c3
|
| 12 |
+
-- realization_mode: agent
|
| 13 |
+
-- source_kind: agent
|
| 14 |
+
SELECT AVG(CASE WHEN CAST("lead_time" AS REAL) <= 53.0 THEN 1 ELSE 0 END) AS "empirical_cdf_at_threshold"
|
| 15 |
+
FROM "m12";
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_b6ca8f85b6355900.sql
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: cardinality_structure
|
| 6 |
+
-- canonical_subitem_id: support_rank_profile_consistency
|
| 7 |
+
-- intended_facet_id: value_imbalance_profile
|
| 8 |
+
-- variant_semantic_role: ranked_signal_view
|
| 9 |
+
-- template_id: tpl_cardinality_distinct_share_profile
|
| 10 |
+
-- query_record_id: v2q_m12_b6ca8f85b6355900
|
| 11 |
+
-- problem_id: v2p_m12_40382bd8b031996c
|
| 12 |
+
-- realization_mode: deterministic
|
| 13 |
+
-- source_kind: deterministic
|
| 14 |
+
WITH grouped AS (
|
| 15 |
+
SELECT "required_car_parking_spaces" AS value_label, COUNT(*) AS support
|
| 16 |
+
FROM "m12"
|
| 17 |
+
GROUP BY "required_car_parking_spaces"
|
| 18 |
+
), ranked AS (
|
| 19 |
+
SELECT
|
| 20 |
+
value_label,
|
| 21 |
+
support,
|
| 22 |
+
CAST(support AS FLOAT) / NULLIF(SUM(support) OVER (), 0) AS support_share,
|
| 23 |
+
SUM(support) OVER (ORDER BY support DESC, value_label ROWS UNBOUNDED PRECEDING) AS cumulative_support
|
| 24 |
+
FROM grouped
|
| 25 |
+
)
|
| 26 |
+
SELECT *
|
| 27 |
+
FROM ranked
|
| 28 |
+
ORDER BY support DESC, value_label;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_bdbaafed349bb2f8.sql
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: tail_rarity_structure
|
| 6 |
+
-- canonical_subitem_id: tail_set_consistency
|
| 7 |
+
-- intended_facet_id: low_support_extremes
|
| 8 |
+
-- variant_semantic_role: rare_extreme_view
|
| 9 |
+
-- template_id: tpl_m4_quantile_tail_slice
|
| 10 |
+
-- query_record_id: v2q_m12_bdbaafed349bb2f8
|
| 11 |
+
-- problem_id: v2p_m12_d6cc1838a72691cd
|
| 12 |
+
-- realization_mode: agent
|
| 13 |
+
-- source_kind: agent
|
| 14 |
+
WITH buckets AS (
|
| 15 |
+
SELECT CAST("stays_in_weekend_nights" AS INTEGER) AS "stays_in_weekend_nights",
|
| 16 |
+
NTILE(10) OVER (ORDER BY CAST("stays_in_weekend_nights" AS INTEGER) DESC) AS "tail_bucket"
|
| 17 |
+
FROM "m12"
|
| 18 |
+
WHERE "stays_in_weekend_nights" IS NOT NULL
|
| 19 |
+
AND "stays_in_weekend_nights" <> ''
|
| 20 |
+
)
|
| 21 |
+
SELECT "stays_in_weekend_nights"
|
| 22 |
+
FROM buckets
|
| 23 |
+
WHERE "tail_bucket" = 1
|
| 24 |
+
ORDER BY "stays_in_weekend_nights" DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_bfbf733312b6b830.sql
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: conditional_dependency_structure
|
| 6 |
+
-- canonical_subitem_id: dependency_strength_similarity
|
| 7 |
+
-- intended_facet_id: pairwise_conditional_dependency
|
| 8 |
+
-- variant_semantic_role: focused_target_view
|
| 9 |
+
-- template_id: tpl_m4_group_condition_rate
|
| 10 |
+
-- query_record_id: v2q_m12_bfbf733312b6b830
|
| 11 |
+
-- problem_id: v2p_m12_511237cdc7f537ce
|
| 12 |
+
-- realization_mode: agent
|
| 13 |
+
-- source_kind: agent
|
| 14 |
+
SELECT "customer_type",
|
| 15 |
+
AVG(CASE WHEN "market_segment" = 'Corporate' THEN 1 ELSE 0 END) AS "condition_rate"
|
| 16 |
+
FROM "m12"
|
| 17 |
+
GROUP BY "customer_type"
|
| 18 |
+
ORDER BY "condition_rate" DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_c1a942495c2ed755.sql
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: missingness_structure
|
| 6 |
+
-- canonical_subitem_id: co_missingness_pattern_consistency
|
| 7 |
+
-- intended_facet_id: missing_rate_by_subgroup
|
| 8 |
+
-- variant_semantic_role: missing_rate_by_subgroup
|
| 9 |
+
-- template_id: tpl_missing_rate_by_subgroup
|
| 10 |
+
-- query_record_id: v2q_m12_c1a942495c2ed755
|
| 11 |
+
-- problem_id: v2p_m12_5ef410d5d9be829a
|
| 12 |
+
-- realization_mode: deterministic
|
| 13 |
+
-- source_kind: deterministic
|
| 14 |
+
SELECT
|
| 15 |
+
"arrival_date_year",
|
| 16 |
+
COUNT(*) AS total_rows,
|
| 17 |
+
SUM(CASE WHEN "company" IS NULL THEN 1 ELSE 0 END) AS missing_rows,
|
| 18 |
+
AVG(CASE WHEN "company" IS NULL THEN 1.0 ELSE 0.0 END) AS missing_rate
|
| 19 |
+
FROM "m12"
|
| 20 |
+
GROUP BY "arrival_date_year"
|
| 21 |
+
ORDER BY missing_rate DESC, total_rows DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_cbc1188c1209ae6c.sql
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: missingness_structure
|
| 6 |
+
-- canonical_subitem_id: co_missingness_pattern_consistency
|
| 7 |
+
-- intended_facet_id: missing_rate_by_subgroup
|
| 8 |
+
-- variant_semantic_role: missing_rate_by_subgroup
|
| 9 |
+
-- template_id: tpl_missing_rate_by_subgroup
|
| 10 |
+
-- query_record_id: v2q_m12_cbc1188c1209ae6c
|
| 11 |
+
-- problem_id: v2p_m12_6296eff449a74cc1
|
| 12 |
+
-- realization_mode: deterministic
|
| 13 |
+
-- source_kind: deterministic
|
| 14 |
+
SELECT
|
| 15 |
+
"hotel",
|
| 16 |
+
COUNT(*) AS total_rows,
|
| 17 |
+
SUM(CASE WHEN "agent" IS NULL THEN 1 ELSE 0 END) AS missing_rows,
|
| 18 |
+
AVG(CASE WHEN "agent" IS NULL THEN 1.0 ELSE 0.0 END) AS missing_rate
|
| 19 |
+
FROM "m12"
|
| 20 |
+
GROUP BY "hotel"
|
| 21 |
+
ORDER BY missing_rate DESC, total_rows DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_cc557b0b39c81e50.sql
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: cardinality_structure
|
| 6 |
+
-- canonical_subitem_id: high_cardinality_response_stability
|
| 7 |
+
-- intended_facet_id: target_cardinality_cross_section
|
| 8 |
+
-- variant_semantic_role: focused_target_view
|
| 9 |
+
-- template_id: tpl_cardinality_high_card_response_stability
|
| 10 |
+
-- query_record_id: v2q_m12_cc557b0b39c81e50
|
| 11 |
+
-- problem_id: v2p_m12_813fa57908e14f02
|
| 12 |
+
-- realization_mode: deterministic
|
| 13 |
+
-- source_kind: deterministic
|
| 14 |
+
SELECT
|
| 15 |
+
"adr",
|
| 16 |
+
COUNT(*) AS support,
|
| 17 |
+
AVG("lead_time") AS avg_response
|
| 18 |
+
FROM "m12"
|
| 19 |
+
GROUP BY "adr"
|
| 20 |
+
HAVING COUNT(*) >= 5.0
|
| 21 |
+
ORDER BY support DESC, avg_response DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_d0c7fb0aeffa205c.sql
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: tail_rarity_structure
|
| 6 |
+
-- canonical_subitem_id: tail_mass_similarity
|
| 7 |
+
-- intended_facet_id: tail_ranked_signal
|
| 8 |
+
-- variant_semantic_role: filtered_stable_view
|
| 9 |
+
-- template_id: tpl_tpch_relative_total_threshold
|
| 10 |
+
-- query_record_id: v2q_m12_d0c7fb0aeffa205c
|
| 11 |
+
-- problem_id: v2p_m12_1dc0c21ace82bf9c
|
| 12 |
+
-- realization_mode: agent
|
| 13 |
+
-- source_kind: agent
|
| 14 |
+
WITH "grouped" AS (
|
| 15 |
+
SELECT
|
| 16 |
+
CAST("days_in_waiting_list" AS INTEGER) AS "days_in_waiting_list",
|
| 17 |
+
SUM(CAST("adults" AS REAL)) AS "group_value"
|
| 18 |
+
FROM "m12"
|
| 19 |
+
WHERE TRIM(COALESCE("days_in_waiting_list", '')) <> ''
|
| 20 |
+
AND TRIM(COALESCE("adults", '')) <> ''
|
| 21 |
+
GROUP BY CAST("days_in_waiting_list" AS INTEGER)
|
| 22 |
+
), "total" AS (
|
| 23 |
+
SELECT SUM("group_value") AS "total_value"
|
| 24 |
+
FROM "grouped"
|
| 25 |
+
)
|
| 26 |
+
SELECT
|
| 27 |
+
g."days_in_waiting_list",
|
| 28 |
+
g."group_value"
|
| 29 |
+
FROM "grouped" AS g
|
| 30 |
+
CROSS JOIN "total" AS t
|
| 31 |
+
WHERE g."group_value" > t."total_value" * 0.05
|
| 32 |
+
ORDER BY g."group_value" DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_db188f60e638c843.sql
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: tail_rarity_structure
|
| 6 |
+
-- canonical_subitem_id: tail_set_consistency
|
| 7 |
+
-- intended_facet_id: low_support_extremes
|
| 8 |
+
-- variant_semantic_role: rare_extreme_view
|
| 9 |
+
-- template_id: tpl_threshold_rarity_cdf
|
| 10 |
+
-- query_record_id: v2q_m12_db188f60e638c843
|
| 11 |
+
-- problem_id: v2p_m12_e9075edab9b6d069
|
| 12 |
+
-- realization_mode: agent
|
| 13 |
+
-- source_kind: agent
|
| 14 |
+
SELECT AVG(CASE WHEN NULLIF("company", '') IS NULL THEN NULL WHEN CAST("company" AS REAL) <= 223.0 THEN 1 ELSE 0 END) AS "empirical_cdf_at_threshold"
|
| 15 |
+
FROM "m12";
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_dfbd2f68b99bcdd8.sql
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: conditional_dependency_structure
|
| 6 |
+
-- canonical_subitem_id: direction_consistency
|
| 7 |
+
-- intended_facet_id: conditional_rate_shift
|
| 8 |
+
-- variant_semantic_role: contrastive_conditional_view
|
| 9 |
+
-- template_id: tpl_m4_group_ratio_two_conditions
|
| 10 |
+
-- query_record_id: v2q_m12_dfbd2f68b99bcdd8
|
| 11 |
+
-- problem_id: v2p_m12_d617e2ae99e327a2
|
| 12 |
+
-- realization_mode: agent
|
| 13 |
+
-- source_kind: agent
|
| 14 |
+
WITH "grouped" AS (
|
| 15 |
+
SELECT
|
| 16 |
+
"children",
|
| 17 |
+
SUM(CASE WHEN "deposit_type" = 'No Deposit' THEN 1 ELSE 0 END) AS "numerator_count",
|
| 18 |
+
SUM(CASE WHEN "deposit_type" = 'Non Refund' THEN 1 ELSE 0 END) AS "denominator_count"
|
| 19 |
+
FROM "m12"
|
| 20 |
+
GROUP BY "children"
|
| 21 |
+
)
|
| 22 |
+
SELECT
|
| 23 |
+
"children",
|
| 24 |
+
CAST("numerator_count" AS FLOAT) / NULLIF("denominator_count", 0) AS "condition_ratio"
|
| 25 |
+
FROM "grouped"
|
| 26 |
+
ORDER BY "condition_ratio" DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_e27b0726bb17cf20.sql
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: cardinality_structure
|
| 6 |
+
-- canonical_subitem_id: support_rank_profile_consistency
|
| 7 |
+
-- intended_facet_id: support_concentration
|
| 8 |
+
-- variant_semantic_role: count_distribution
|
| 9 |
+
-- template_id: tpl_cardinality_support_rank_profile
|
| 10 |
+
-- query_record_id: v2q_m12_e27b0726bb17cf20
|
| 11 |
+
-- problem_id: v2p_m12_f06ffbba06f19fcc
|
| 12 |
+
-- realization_mode: deterministic
|
| 13 |
+
-- source_kind: deterministic
|
| 14 |
+
WITH grouped AS (
|
| 15 |
+
SELECT "assigned_room_type" AS value_label, COUNT(*) AS support
|
| 16 |
+
FROM "m12"
|
| 17 |
+
GROUP BY "assigned_room_type"
|
| 18 |
+
)
|
| 19 |
+
SELECT
|
| 20 |
+
value_label,
|
| 21 |
+
support,
|
| 22 |
+
CAST(support AS FLOAT) / NULLIF(SUM(support) OVER (), 0) AS support_share,
|
| 23 |
+
ROW_NUMBER() OVER (ORDER BY support DESC, value_label) AS support_rank
|
| 24 |
+
FROM grouped
|
| 25 |
+
ORDER BY support DESC, value_label;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_e44302143ddafe6f.sql
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: conditional_dependency_structure
|
| 6 |
+
-- canonical_subitem_id: direction_consistency
|
| 7 |
+
-- intended_facet_id: conditional_rate_shift
|
| 8 |
+
-- variant_semantic_role: within_group_proportion
|
| 9 |
+
-- template_id: tpl_m4_group_condition_rate
|
| 10 |
+
-- query_record_id: v2q_m12_e44302143ddafe6f
|
| 11 |
+
-- problem_id: v2p_m12_378cd4319f78bee0
|
| 12 |
+
-- realization_mode: agent
|
| 13 |
+
-- source_kind: agent
|
| 14 |
+
SELECT "assigned_room_type",
|
| 15 |
+
AVG(CASE WHEN "is_canceled" = '1' THEN 1 ELSE 0 END) AS condition_rate
|
| 16 |
+
FROM "m12"
|
| 17 |
+
GROUP BY "assigned_room_type"
|
| 18 |
+
ORDER BY condition_rate DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_ebfa7172187b0f67.sql
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: tail_rarity_structure
|
| 6 |
+
-- canonical_subitem_id: tail_mass_similarity
|
| 7 |
+
-- intended_facet_id: tail_ranked_signal
|
| 8 |
+
-- variant_semantic_role: count_distribution
|
| 9 |
+
-- template_id: tpl_tpch_relative_total_threshold
|
| 10 |
+
-- query_record_id: v2q_m12_ebfa7172187b0f67
|
| 11 |
+
-- problem_id: v2p_m12_379ccc0d39cdc215
|
| 12 |
+
-- realization_mode: agent
|
| 13 |
+
-- source_kind: agent
|
| 14 |
+
WITH grouped AS (
|
| 15 |
+
SELECT "customer_type", SUM(COALESCE(CAST(NULLIF("children", '') AS REAL), 0)) AS group_value
|
| 16 |
+
FROM "m12"
|
| 17 |
+
GROUP BY "customer_type"
|
| 18 |
+
), total AS (
|
| 19 |
+
SELECT SUM(group_value) AS total_value
|
| 20 |
+
FROM grouped
|
| 21 |
+
)
|
| 22 |
+
SELECT g."customer_type", g.group_value
|
| 23 |
+
FROM grouped AS g
|
| 24 |
+
CROSS JOIN total AS t
|
| 25 |
+
WHERE g.group_value > t.total_value * 0.05
|
| 26 |
+
ORDER BY g.group_value DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_ed9ec34048a49f07.sql
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: conditional_dependency_structure
|
| 6 |
+
-- canonical_subitem_id: dependency_strength_similarity
|
| 7 |
+
-- intended_facet_id: pairwise_conditional_dependency
|
| 8 |
+
-- variant_semantic_role: focused_target_view
|
| 9 |
+
-- template_id: tpl_tpcds_within_group_share
|
| 10 |
+
-- query_record_id: v2q_m12_ed9ec34048a49f07
|
| 11 |
+
-- problem_id: v2p_m12_681c42df9002b930
|
| 12 |
+
-- realization_mode: agent
|
| 13 |
+
-- source_kind: agent
|
| 14 |
+
SELECT "reservation_status", "stays_in_week_nights",
|
| 15 |
+
SUM(CAST(NULLIF("adr", '') AS REAL)) AS total_measure,
|
| 16 |
+
SUM(CAST(NULLIF("adr", '') AS REAL)) * 100.0
|
| 17 |
+
/ SUM(SUM(CAST(NULLIF("adr", '') AS REAL))) OVER (PARTITION BY "reservation_status") AS share_within_group
|
| 18 |
+
FROM "m12"
|
| 19 |
+
GROUP BY "reservation_status", "stays_in_week_nights"
|
| 20 |
+
ORDER BY share_within_group DESC;
|
Query/sql/v2/runs/v2_cli_20260502_081223_c/m12/sql/v2q_m12_efec7032d628cacb.sql
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- sql_source_version: v2
|
| 2 |
+
-- sql_source_label: v2_current
|
| 3 |
+
-- sql_source_run_id: v2_cli_20260502_081223_c
|
| 4 |
+
-- sql_source_dataset_id: m12
|
| 5 |
+
-- family_id: tail_rarity_structure
|
| 6 |
+
-- canonical_subitem_id: tail_mass_similarity
|
| 7 |
+
-- intended_facet_id: tail_ranked_signal
|
| 8 |
+
-- variant_semantic_role: count_distribution
|
| 9 |
+
-- template_id: tpl_tpch_relative_total_threshold
|
| 10 |
+
-- query_record_id: v2q_m12_efec7032d628cacb
|
| 11 |
+
-- problem_id: v2p_m12_d1175809ecee058e
|
| 12 |
+
-- realization_mode: agent
|
| 13 |
+
-- source_kind: agent
|
| 14 |
+
WITH grouped AS (
|
| 15 |
+
SELECT
|
| 16 |
+
"total_of_special_requests",
|
| 17 |
+
SUM(CAST(NULLIF("agent", '') AS REAL)) AS group_value
|
| 18 |
+
FROM "m12"
|
| 19 |
+
GROUP BY "total_of_special_requests"
|
| 20 |
+
), total AS (
|
| 21 |
+
SELECT SUM(group_value) AS total_value
|
| 22 |
+
FROM grouped
|
| 23 |
+
)
|
| 24 |
+
SELECT
|
| 25 |
+
g."total_of_special_requests",
|
| 26 |
+
g.group_value
|
| 27 |
+
FROM grouped AS g
|
| 28 |
+
CROSS JOIN total AS t
|
| 29 |
+
WHERE g.group_value > t.total_value * 0.05
|
| 30 |
+
ORDER BY g.group_value DESC;
|