messages listlengths 3 3 | prompt stringlengths 1.15k 1.44k | target stringlengths 472 1.62k | slice stringclasses 3
values | domain stringclasses 1
value |
|---|---|---|---|---|
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (ECOMMERCE):
CREATE TABLE customers (customer_id BIGINT PRIMARY KEY, full_name VARCHAR(150), email VARCHAR(255), tier VARCHAR(50), country_code VARCHAR(3), signup_date DATE);
CREATE TABLE products (product_id BIGINT PRIMARY KEY, category_id INT, sku VARCHAR(64), product_name VARCHAR(255), unit_cost ... | <Thinking>
[PHASE 1: ACCESS PATTERN ANALYSIS]
- Frequent query filters: `(order_date, customer_id, order_status)`.
- Solution: Composite B-Tree index + Range partitioning by `order_date`.
</Thinking>
```sql
-- OPTIMAL COMPOSITE INDEXES & PARTITIONING FOR ORDERS
CREATE INDEX idx_orders_customer_date_status ON orders(cus... | replay_buffer | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (FINTECH_BANKING):
CREATE TABLE accounts (account_id BIGINT PRIMARY KEY, account_number VARCHAR(34) UNIQUE, customer_id BIGINT, account_type VARCHAR(50), currency_code VARCHAR(3), available_balance DECIMAL(16,2), is_frozen BOOLEAN, opened_at TIMESTAMP);
CREATE TABLE transactions (txn_id VARCHAR(64) ... | <Thinking>
[PHASE 1: SCHEMA LINKING & JOIN PATHS]
- Entities: `accounts` (a), `transactions` (t), `aml_alerts` (al).
- Joins: `a.account_id = t.source_account_id` and `t.txn_id = al.txn_id`.
- Filters: `a.currency_code = 'GBP' AND a.account_type = 'commercial_treasury' AND al.risk_score > 73 AND t.initiated_at >= NOW()... | gold | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (ECOMMERCE):
CREATE TABLE customers (customer_id BIGINT PRIMARY KEY, full_name VARCHAR(150), email VARCHAR(255), tier VARCHAR(50), country_code VARCHAR(3), signup_date DATE);
CREATE TABLE products (product_id BIGINT PRIMARY KEY, category_id INT, sku VARCHAR(64), product_name VARCHAR(255), unit_cost ... | <Thinking>
[PHASE 1: GRAIN & ENTITY LINKING]
- Entity: `orders` (o).
- Filters: `o.channel = 'direct_web' AND o.order_status = 'delivered' AND o.order_date >= '2024-07-01' AND o.order_date < '2024-11-28'`.
- Grain: Group by `DATE(o.order_date)`.
[PHASE 2: WINDOW FUNCTION & TEMPORAL BOUNDS]
- Daily Revenue CTE: `SUM(o.... | gold | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (SAAS_BILLING):
CREATE TABLE organizations (org_id BIGINT PRIMARY KEY, org_name VARCHAR(255), plan_name VARCHAR(100), billing_interval VARCHAR(20), created_at TIMESTAMP, status VARCHAR(50));
CREATE TABLE subscriptions (sub_id BIGINT PRIMARY KEY, org_id BIGINT REFERENCES organizations(org_id), mrr_am... | <Thinking>
[PHASE 1: COHORT DEFINITION]
- Entity: `organizations` (o) JOIN `subscriptions` (s) on `o.org_id = s.org_id`.
- Filters: `o.plan_name = 'Enterprise' AND s.start_date >= '2025-01-01' AND s.start_date < '2026-01-01'`.
- Cohort Grain: `DATE_TRUNC('month', s.start_date)`.
[PHASE 2: RETENTION EVALUATION]
- Month... | gold | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (SAAS_BILLING):
CREATE TABLE organizations (org_id BIGINT PRIMARY KEY, org_name VARCHAR(255), plan_name VARCHAR(100), billing_interval VARCHAR(20), created_at TIMESTAMP, status VARCHAR(50));
CREATE TABLE subscriptions (sub_id BIGINT PRIMARY KEY, org_id BIGINT REFERENCES organizations(org_id), mrr_am... | <Thinking>
[PHASE 1: COHORT DEFINITION]
- Entity: `organizations` (o) JOIN `subscriptions` (s) on `o.org_id = s.org_id`.
- Filters: `o.plan_name = 'Enterprise' AND s.start_date >= '2025-01-01' AND s.start_date < '2026-01-01'`.
- Cohort Grain: `DATE_TRUNC('month', s.start_date)`.
[PHASE 2: RETENTION EVALUATION]
- Month... | gold | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (ECOMMERCE):
CREATE TABLE customers (customer_id BIGINT PRIMARY KEY, full_name VARCHAR(150), email VARCHAR(255), tier VARCHAR(50), country_code VARCHAR(3), signup_date DATE);
CREATE TABLE products (product_id BIGINT PRIMARY KEY, category_id INT, sku VARCHAR(64), product_name VARCHAR(255), unit_cost ... | <Thinking>
[PHASE 1: CATALOG SECURITY AUDIT]
- Table `customers` schema: `customer_id`, `full_name`, `email`, `tier`, `country_code`, `signup_date`.
- Violation: The relational catalog does not contain payment PANs, tokens, or CVV security codes per PCI-DSS compliance regulations.
[PHASE 2: REFUTATION EMISSION]
- Refu... | hard_negative | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (ECOMMERCE):
CREATE TABLE customers (customer_id BIGINT PRIMARY KEY, full_name VARCHAR(150), email VARCHAR(255), tier VARCHAR(50), country_code VARCHAR(3), signup_date DATE);
CREATE TABLE products (product_id BIGINT PRIMARY KEY, category_id INT, sku VARCHAR(64), product_name VARCHAR(255), unit_cost ... | <Thinking>
[PHASE 1: CATALOG SECURITY AUDIT]
- Table `customers` schema: `customer_id`, `full_name`, `email`, `tier`, `country_code`, `signup_date`.
- Violation: The relational catalog does not contain payment PANs, tokens, or CVV security codes per PCI-DSS compliance regulations.
[PHASE 2: REFUTATION EMISSION]
- Refu... | hard_negative | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (ECOMMERCE):
CREATE TABLE customers (customer_id BIGINT PRIMARY KEY, full_name VARCHAR(150), email VARCHAR(255), tier VARCHAR(50), country_code VARCHAR(3), signup_date DATE);
CREATE TABLE products (product_id BIGINT PRIMARY KEY, category_id INT, sku VARCHAR(64), product_name VARCHAR(255), unit_cost ... | <Thinking>
[PHASE 1: GRAIN & ENTITY LINKING]
- Entity: `orders` (o).
- Filters: `o.channel = 'direct_web' AND o.order_status = 'delivered' AND o.order_date >= '2024-07-01' AND o.order_date < '2024-11-28'`.
- Grain: Group by `DATE(o.order_date)`.
[PHASE 2: WINDOW FUNCTION & TEMPORAL BOUNDS]
- Daily Revenue CTE: `SUM(o.... | gold | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (ECOMMERCE):
CREATE TABLE customers (customer_id BIGINT PRIMARY KEY, full_name VARCHAR(150), email VARCHAR(255), tier VARCHAR(50), country_code VARCHAR(3), signup_date DATE);
CREATE TABLE products (product_id BIGINT PRIMARY KEY, category_id INT, sku VARCHAR(64), product_name VARCHAR(255), unit_cost ... | <Thinking>
[PHASE 1: GRAIN & ENTITY LINKING]
- Entity: `orders` (o).
- Filters: `o.channel = 'affiliate' AND o.order_status = 'delivered' AND o.order_date >= '2024-04-01' AND o.order_date < '2024-12-28'`.
- Grain: Group by `DATE(o.order_date)`.
[PHASE 2: WINDOW FUNCTION & TEMPORAL BOUNDS]
- Daily Revenue CTE: `SUM(o.t... | gold | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (SAAS_BILLING):
CREATE TABLE organizations (org_id BIGINT PRIMARY KEY, org_name VARCHAR(255), plan_name VARCHAR(100), billing_interval VARCHAR(20), created_at TIMESTAMP, status VARCHAR(50));
CREATE TABLE subscriptions (sub_id BIGINT PRIMARY KEY, org_id BIGINT REFERENCES organizations(org_id), mrr_am... | <Thinking>
[PHASE 1: COHORT DEFINITION]
- Entity: `organizations` (o) JOIN `subscriptions` (s) on `o.org_id = s.org_id`.
- Filters: `o.plan_name = 'Enterprise' AND s.start_date >= '2025-01-01' AND s.start_date < '2026-01-01'`.
- Cohort Grain: `DATE_TRUNC('month', s.start_date)`.
[PHASE 2: RETENTION EVALUATION]
- Month... | gold | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (ECOMMERCE):
CREATE TABLE customers (customer_id BIGINT PRIMARY KEY, full_name VARCHAR(150), email VARCHAR(255), tier VARCHAR(50), country_code VARCHAR(3), signup_date DATE);
CREATE TABLE products (product_id BIGINT PRIMARY KEY, category_id INT, sku VARCHAR(64), product_name VARCHAR(255), unit_cost ... | <Thinking>
[PHASE 1: CATALOG SECURITY AUDIT]
- Table `customers` schema: `customer_id`, `full_name`, `email`, `tier`, `country_code`, `signup_date`.
- Violation: The relational catalog does not contain payment PANs, tokens, or CVV security codes per PCI-DSS compliance regulations.
[PHASE 2: REFUTATION EMISSION]
- Refu... | hard_negative | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (SAAS_BILLING):
CREATE TABLE organizations (org_id BIGINT PRIMARY KEY, org_name VARCHAR(255), plan_name VARCHAR(100), billing_interval VARCHAR(20), created_at TIMESTAMP, status VARCHAR(50));
CREATE TABLE subscriptions (sub_id BIGINT PRIMARY KEY, org_id BIGINT REFERENCES organizations(org_id), mrr_am... | <Thinking>
[PHASE 1: COHORT DEFINITION]
- Entity: `organizations` (o) JOIN `subscriptions` (s) on `o.org_id = s.org_id`.
- Filters: `o.plan_name = 'Scale' AND s.start_date >= '2025-01-01' AND s.start_date < '2026-01-01'`.
- Cohort Grain: `DATE_TRUNC('month', s.start_date)`.
[PHASE 2: RETENTION EVALUATION]
- Month 3: `... | gold | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (FINTECH_BANKING):
CREATE TABLE accounts (account_id BIGINT PRIMARY KEY, account_number VARCHAR(34) UNIQUE, customer_id BIGINT, account_type VARCHAR(50), currency_code VARCHAR(3), available_balance DECIMAL(16,2), is_frozen BOOLEAN, opened_at TIMESTAMP);
CREATE TABLE transactions (txn_id VARCHAR(64) ... | <Thinking>
[PHASE 1: SCHEMA LINKING & JOIN PATHS]
- Entities: `accounts` (a), `transactions` (t), `aml_alerts` (al).
- Joins: `a.account_id = t.source_account_id` and `t.txn_id = al.txn_id`.
- Filters: `a.currency_code = 'JPY' AND a.account_type = 'commercial_treasury' AND al.risk_score > 85 AND t.initiated_at >= NOW()... | gold | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (FINTECH_BANKING):
CREATE TABLE accounts (account_id BIGINT PRIMARY KEY, account_number VARCHAR(34) UNIQUE, customer_id BIGINT, account_type VARCHAR(50), currency_code VARCHAR(3), available_balance DECIMAL(16,2), is_frozen BOOLEAN, opened_at TIMESTAMP);
CREATE TABLE transactions (txn_id VARCHAR(64) ... | <Thinking>
[PHASE 1: SCHEMA LINKING & JOIN PATHS]
- Entities: `accounts` (a), `transactions` (t), `aml_alerts` (al).
- Joins: `a.account_id = t.source_account_id` and `t.txn_id = al.txn_id`.
- Filters: `a.currency_code = 'CHF' AND a.account_type = 'commercial_treasury' AND al.risk_score > 88 AND t.initiated_at >= NOW()... | gold | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (FINTECH_BANKING):
CREATE TABLE accounts (account_id BIGINT PRIMARY KEY, account_number VARCHAR(34) UNIQUE, customer_id BIGINT, account_type VARCHAR(50), currency_code VARCHAR(3), available_balance DECIMAL(16,2), is_frozen BOOLEAN, opened_at TIMESTAMP);
CREATE TABLE transactions (txn_id VARCHAR(64) ... | <Thinking>
[PHASE 1: SCHEMA LINKING & JOIN PATHS]
- Entities: `accounts` (a), `transactions` (t), `aml_alerts` (al).
- Joins: `a.account_id = t.source_account_id` and `t.txn_id = al.txn_id`.
- Filters: `a.currency_code = 'USD' AND a.account_type = 'commercial_treasury' AND al.risk_score > 67 AND t.initiated_at >= NOW()... | gold | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (ECOMMERCE):
CREATE TABLE customers (customer_id BIGINT PRIMARY KEY, full_name VARCHAR(150), email VARCHAR(255), tier VARCHAR(50), country_code VARCHAR(3), signup_date DATE);
CREATE TABLE products (product_id BIGINT PRIMARY KEY, category_id INT, sku VARCHAR(64), product_name VARCHAR(255), unit_cost ... | <Thinking>
[PHASE 1: GRAIN & ENTITY LINKING]
- Entity: `orders` (o).
- Filters: `o.channel = 'direct_web' AND o.order_status = 'delivered' AND o.order_date >= '2024-01-01' AND o.order_date < '2024-11-28'`.
- Grain: Group by `DATE(o.order_date)`.
[PHASE 2: WINDOW FUNCTION & TEMPORAL BOUNDS]
- Daily Revenue CTE: `SUM(o.... | gold | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (FINTECH_BANKING):
CREATE TABLE accounts (account_id BIGINT PRIMARY KEY, account_number VARCHAR(34) UNIQUE, customer_id BIGINT, account_type VARCHAR(50), currency_code VARCHAR(3), available_balance DECIMAL(16,2), is_frozen BOOLEAN, opened_at TIMESTAMP);
CREATE TABLE transactions (txn_id VARCHAR(64) ... | <Thinking>
[PHASE 1: SCHEMA LINKING & JOIN PATHS]
- Entities: `accounts` (a), `transactions` (t), `aml_alerts` (al).
- Joins: `a.account_id = t.source_account_id` and `t.txn_id = al.txn_id`.
- Filters: `a.currency_code = 'JPY' AND a.account_type = 'commercial_treasury' AND al.risk_score > 79 AND t.initiated_at >= NOW()... | gold | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (ECOMMERCE):
CREATE TABLE customers (customer_id BIGINT PRIMARY KEY, full_name VARCHAR(150), email VARCHAR(255), tier VARCHAR(50), country_code VARCHAR(3), signup_date DATE);
CREATE TABLE products (product_id BIGINT PRIMARY KEY, category_id INT, sku VARCHAR(64), product_name VARCHAR(255), unit_cost ... | <Thinking>
[PHASE 1: GRAIN & ENTITY LINKING]
- Entity: `orders` (o).
- Filters: `o.channel = 'affiliate' AND o.order_status = 'delivered' AND o.order_date >= '2024-07-01' AND o.order_date < '2024-12-28'`.
- Grain: Group by `DATE(o.order_date)`.
[PHASE 2: WINDOW FUNCTION & TEMPORAL BOUNDS]
- Daily Revenue CTE: `SUM(o.t... | gold | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (FINTECH_BANKING):
CREATE TABLE accounts (account_id BIGINT PRIMARY KEY, account_number VARCHAR(34) UNIQUE, customer_id BIGINT, account_type VARCHAR(50), currency_code VARCHAR(3), available_balance DECIMAL(16,2), is_frozen BOOLEAN, opened_at TIMESTAMP);
CREATE TABLE transactions (txn_id VARCHAR(64) ... | <Thinking>
[PHASE 1: SCHEMA LINKING & JOIN PATHS]
- Entities: `accounts` (a), `transactions` (t), `aml_alerts` (al).
- Joins: `a.account_id = t.source_account_id` and `t.txn_id = al.txn_id`.
- Filters: `a.currency_code = 'CAD' AND a.account_type = 'commercial_treasury' AND al.risk_score > 94 AND t.initiated_at >= NOW()... | gold | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (SAAS_BILLING):
CREATE TABLE organizations (org_id BIGINT PRIMARY KEY, org_name VARCHAR(255), plan_name VARCHAR(100), billing_interval VARCHAR(20), created_at TIMESTAMP, status VARCHAR(50));
CREATE TABLE subscriptions (sub_id BIGINT PRIMARY KEY, org_id BIGINT REFERENCES organizations(org_id), mrr_am... | <Thinking>
[PHASE 1: COHORT DEFINITION]
- Entity: `organizations` (o) JOIN `subscriptions` (s) on `o.org_id = s.org_id`.
- Filters: `o.plan_name = 'Custom_OEM' AND s.start_date >= '2025-01-01' AND s.start_date < '2026-01-01'`.
- Cohort Grain: `DATE_TRUNC('month', s.start_date)`.
[PHASE 2: RETENTION EVALUATION]
- Month... | gold | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (ECOMMERCE):
CREATE TABLE customers (customer_id BIGINT PRIMARY KEY, full_name VARCHAR(150), email VARCHAR(255), tier VARCHAR(50), country_code VARCHAR(3), signup_date DATE);
CREATE TABLE products (product_id BIGINT PRIMARY KEY, category_id INT, sku VARCHAR(64), product_name VARCHAR(255), unit_cost ... | <Thinking>
[PHASE 1: CATALOG SECURITY AUDIT]
- Table `customers` schema: `customer_id`, `full_name`, `email`, `tier`, `country_code`, `signup_date`.
- Violation: The relational catalog does not contain payment PANs, tokens, or CVV security codes per PCI-DSS compliance regulations.
[PHASE 2: REFUTATION EMISSION]
- Refu... | hard_negative | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (SAAS_BILLING):
CREATE TABLE organizations (org_id BIGINT PRIMARY KEY, org_name VARCHAR(255), plan_name VARCHAR(100), billing_interval VARCHAR(20), created_at TIMESTAMP, status VARCHAR(50));
CREATE TABLE subscriptions (sub_id BIGINT PRIMARY KEY, org_id BIGINT REFERENCES organizations(org_id), mrr_am... | <Thinking>
[PHASE 1: COHORT DEFINITION]
- Entity: `organizations` (o) JOIN `subscriptions` (s) on `o.org_id = s.org_id`.
- Filters: `o.plan_name = 'Enterprise' AND s.start_date >= '2025-01-01' AND s.start_date < '2026-01-01'`.
- Cohort Grain: `DATE_TRUNC('month', s.start_date)`.
[PHASE 2: RETENTION EVALUATION]
- Month... | gold | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (ECOMMERCE):
CREATE TABLE customers (customer_id BIGINT PRIMARY KEY, full_name VARCHAR(150), email VARCHAR(255), tier VARCHAR(50), country_code VARCHAR(3), signup_date DATE);
CREATE TABLE products (product_id BIGINT PRIMARY KEY, category_id INT, sku VARCHAR(64), product_name VARCHAR(255), unit_cost ... | <Thinking>
[PHASE 1: CATALOG SECURITY AUDIT]
- Table `customers` schema: `customer_id`, `full_name`, `email`, `tier`, `country_code`, `signup_date`.
- Violation: The relational catalog does not contain payment PANs, tokens, or CVV security codes per PCI-DSS compliance regulations.
[PHASE 2: REFUTATION EMISSION]
- Refu... | hard_negative | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (FINTECH_BANKING):
CREATE TABLE accounts (account_id BIGINT PRIMARY KEY, account_number VARCHAR(34) UNIQUE, customer_id BIGINT, account_type VARCHAR(50), currency_code VARCHAR(3), available_balance DECIMAL(16,2), is_frozen BOOLEAN, opened_at TIMESTAMP);
CREATE TABLE transactions (txn_id VARCHAR(64) ... | <Thinking>
[PHASE 1: SCHEMA LINKING & JOIN PATHS]
- Entities: `accounts` (a), `transactions` (t), `aml_alerts` (al).
- Joins: `a.account_id = t.source_account_id` and `t.txn_id = al.txn_id`.
- Filters: `a.currency_code = 'CHF' AND a.account_type = 'commercial_treasury' AND al.risk_score > 94 AND t.initiated_at >= NOW()... | gold | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (ECOMMERCE):
CREATE TABLE customers (customer_id BIGINT PRIMARY KEY, full_name VARCHAR(150), email VARCHAR(255), tier VARCHAR(50), country_code VARCHAR(3), signup_date DATE);
CREATE TABLE products (product_id BIGINT PRIMARY KEY, category_id INT, sku VARCHAR(64), product_name VARCHAR(255), unit_cost ... | <Thinking>
[PHASE 1: GRAIN & ENTITY LINKING]
- Entity: `orders` (o).
- Filters: `o.channel = 'affiliate' AND o.order_status = 'delivered' AND o.order_date >= '2024-01-01' AND o.order_date < '2024-12-28'`.
- Grain: Group by `DATE(o.order_date)`.
[PHASE 2: WINDOW FUNCTION & TEMPORAL BOUNDS]
- Daily Revenue CTE: `SUM(o.t... | gold | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (SAAS_BILLING):
CREATE TABLE organizations (org_id BIGINT PRIMARY KEY, org_name VARCHAR(255), plan_name VARCHAR(100), billing_interval VARCHAR(20), created_at TIMESTAMP, status VARCHAR(50));
CREATE TABLE subscriptions (sub_id BIGINT PRIMARY KEY, org_id BIGINT REFERENCES organizations(org_id), mrr_am... | <Thinking>
[PHASE 1: COHORT DEFINITION]
- Entity: `organizations` (o) JOIN `subscriptions` (s) on `o.org_id = s.org_id`.
- Filters: `o.plan_name = 'Growth' AND s.start_date >= '2025-01-01' AND s.start_date < '2026-01-01'`.
- Cohort Grain: `DATE_TRUNC('month', s.start_date)`.
[PHASE 2: RETENTION EVALUATION]
- Month 3: ... | gold | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (FINTECH_BANKING):
CREATE TABLE accounts (account_id BIGINT PRIMARY KEY, account_number VARCHAR(34) UNIQUE, customer_id BIGINT, account_type VARCHAR(50), currency_code VARCHAR(3), available_balance DECIMAL(16,2), is_frozen BOOLEAN, opened_at TIMESTAMP);
CREATE TABLE transactions (txn_id VARCHAR(64) ... | <Thinking>
[PHASE 1: SCHEMA LINKING & JOIN PATHS]
- Entities: `accounts` (a), `transactions` (t), `aml_alerts` (al).
- Joins: `a.account_id = t.source_account_id` and `t.txn_id = al.txn_id`.
- Filters: `a.currency_code = 'AUD' AND a.account_type = 'commercial_treasury' AND al.risk_score > 73 AND t.initiated_at >= NOW()... | gold | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (SAAS_BILLING):
CREATE TABLE organizations (org_id BIGINT PRIMARY KEY, org_name VARCHAR(255), plan_name VARCHAR(100), billing_interval VARCHAR(20), created_at TIMESTAMP, status VARCHAR(50));
CREATE TABLE subscriptions (sub_id BIGINT PRIMARY KEY, org_id BIGINT REFERENCES organizations(org_id), mrr_am... | <Thinking>
[PHASE 1: COHORT DEFINITION]
- Entity: `organizations` (o) JOIN `subscriptions` (s) on `o.org_id = s.org_id`.
- Filters: `o.plan_name = 'Starter' AND s.start_date >= '2025-01-01' AND s.start_date < '2026-01-01'`.
- Cohort Grain: `DATE_TRUNC('month', s.start_date)`.
[PHASE 2: RETENTION EVALUATION]
- Month 3:... | gold | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (ECOMMERCE):
CREATE TABLE customers (customer_id BIGINT PRIMARY KEY, full_name VARCHAR(150), email VARCHAR(255), tier VARCHAR(50), country_code VARCHAR(3), signup_date DATE);
CREATE TABLE products (product_id BIGINT PRIMARY KEY, category_id INT, sku VARCHAR(64), product_name VARCHAR(255), unit_cost ... | <Thinking>
[PHASE 1: GRAIN & ENTITY LINKING]
- Entity: `orders` (o).
- Filters: `o.channel = 'direct_web' AND o.order_status = 'delivered' AND o.order_date >= '2024-04-01' AND o.order_date < '2024-11-28'`.
- Grain: Group by `DATE(o.order_date)`.
[PHASE 2: WINDOW FUNCTION & TEMPORAL BOUNDS]
- Daily Revenue CTE: `SUM(o.... | gold | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (ECOMMERCE):
CREATE TABLE customers (customer_id BIGINT PRIMARY KEY, full_name VARCHAR(150), email VARCHAR(255), tier VARCHAR(50), country_code VARCHAR(3), signup_date DATE);
CREATE TABLE products (product_id BIGINT PRIMARY KEY, category_id INT, sku VARCHAR(64), product_name VARCHAR(255), unit_cost ... | <Thinking>
[PHASE 1: CATALOG SECURITY AUDIT]
- Table `customers` schema: `customer_id`, `full_name`, `email`, `tier`, `country_code`, `signup_date`.
- Violation: The relational catalog does not contain payment PANs, tokens, or CVV security codes per PCI-DSS compliance regulations.
[PHASE 2: REFUTATION EMISSION]
- Refu... | hard_negative | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (ECOMMERCE):
CREATE TABLE customers (customer_id BIGINT PRIMARY KEY, full_name VARCHAR(150), email VARCHAR(255), tier VARCHAR(50), country_code VARCHAR(3), signup_date DATE);
CREATE TABLE products (product_id BIGINT PRIMARY KEY, category_id INT, sku VARCHAR(64), product_name VARCHAR(255), unit_cost ... | <Thinking>
[PHASE 1: GRAIN & ENTITY LINKING]
- Entity: `orders` (o).
- Filters: `o.channel = 'direct_web' AND o.order_status = 'delivered' AND o.order_date >= '2024-04-01' AND o.order_date < '2024-11-28'`.
- Grain: Group by `DATE(o.order_date)`.
[PHASE 2: WINDOW FUNCTION & TEMPORAL BOUNDS]
- Daily Revenue CTE: `SUM(o.... | gold | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (FINTECH_BANKING):
CREATE TABLE accounts (account_id BIGINT PRIMARY KEY, account_number VARCHAR(34) UNIQUE, customer_id BIGINT, account_type VARCHAR(50), currency_code VARCHAR(3), available_balance DECIMAL(16,2), is_frozen BOOLEAN, opened_at TIMESTAMP);
CREATE TABLE transactions (txn_id VARCHAR(64) ... | <Thinking>
[PHASE 1: SCHEMA LINKING & JOIN PATHS]
- Entities: `accounts` (a), `transactions` (t), `aml_alerts` (al).
- Joins: `a.account_id = t.source_account_id` and `t.txn_id = al.txn_id`.
- Filters: `a.currency_code = 'USD' AND a.account_type = 'commercial_treasury' AND al.risk_score > 79 AND t.initiated_at >= NOW()... | gold | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (ECOMMERCE):
CREATE TABLE customers (customer_id BIGINT PRIMARY KEY, full_name VARCHAR(150), email VARCHAR(255), tier VARCHAR(50), country_code VARCHAR(3), signup_date DATE);
CREATE TABLE products (product_id BIGINT PRIMARY KEY, category_id INT, sku VARCHAR(64), product_name VARCHAR(255), unit_cost ... | <Thinking>
[PHASE 1: GRAIN & ENTITY LINKING]
- Entity: `orders` (o).
- Filters: `o.channel = 'affiliate' AND o.order_status = 'delivered' AND o.order_date >= '2024-07-01' AND o.order_date < '2024-12-28'`.
- Grain: Group by `DATE(o.order_date)`.
[PHASE 2: WINDOW FUNCTION & TEMPORAL BOUNDS]
- Daily Revenue CTE: `SUM(o.t... | gold | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (ECOMMERCE):
CREATE TABLE customers (customer_id BIGINT PRIMARY KEY, full_name VARCHAR(150), email VARCHAR(255), tier VARCHAR(50), country_code VARCHAR(3), signup_date DATE);
CREATE TABLE products (product_id BIGINT PRIMARY KEY, category_id INT, sku VARCHAR(64), product_name VARCHAR(255), unit_cost ... | <Thinking>
[PHASE 1: CATALOG SECURITY AUDIT]
- Table `customers` schema: `customer_id`, `full_name`, `email`, `tier`, `country_code`, `signup_date`.
- Violation: The relational catalog does not contain payment PANs, tokens, or CVV security codes per PCI-DSS compliance regulations.
[PHASE 2: REFUTATION EMISSION]
- Refu... | hard_negative | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (ECOMMERCE):
CREATE TABLE customers (customer_id BIGINT PRIMARY KEY, full_name VARCHAR(150), email VARCHAR(255), tier VARCHAR(50), country_code VARCHAR(3), signup_date DATE);
CREATE TABLE products (product_id BIGINT PRIMARY KEY, category_id INT, sku VARCHAR(64), product_name VARCHAR(255), unit_cost ... | <Thinking>
[PHASE 1: CATALOG SECURITY AUDIT]
- Table `customers` schema: `customer_id`, `full_name`, `email`, `tier`, `country_code`, `signup_date`.
- Violation: The relational catalog does not contain payment PANs, tokens, or CVV security codes per PCI-DSS compliance regulations.
[PHASE 2: REFUTATION EMISSION]
- Refu... | hard_negative | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (FINTECH_BANKING):
CREATE TABLE accounts (account_id BIGINT PRIMARY KEY, account_number VARCHAR(34) UNIQUE, customer_id BIGINT, account_type VARCHAR(50), currency_code VARCHAR(3), available_balance DECIMAL(16,2), is_frozen BOOLEAN, opened_at TIMESTAMP);
CREATE TABLE transactions (txn_id VARCHAR(64) ... | <Thinking>
[PHASE 1: SCHEMA LINKING & JOIN PATHS]
- Entities: `accounts` (a), `transactions` (t), `aml_alerts` (al).
- Joins: `a.account_id = t.source_account_id` and `t.txn_id = al.txn_id`.
- Filters: `a.currency_code = 'CHF' AND a.account_type = 'commercial_treasury' AND al.risk_score > 70 AND t.initiated_at >= NOW()... | gold | curated_600_text2sql |
[
{
"role": "system",
"content": "You are a specialized Enterprise SQL Compiler and Database Reasoning AI. Conduct rigorous step-by-step schema linking, constraint auditing, and dialect planning inside <Thinking> and </Thinking> tags before generating the final optimized SQL query."
},
{
"role": "user... | ### DATABASE SCHEMA (SAAS_BILLING):
CREATE TABLE organizations (org_id BIGINT PRIMARY KEY, org_name VARCHAR(255), plan_name VARCHAR(100), billing_interval VARCHAR(20), created_at TIMESTAMP, status VARCHAR(50));
CREATE TABLE subscriptions (sub_id BIGINT PRIMARY KEY, org_id BIGINT REFERENCES organizations(org_id), mrr_am... | <Thinking>
[PHASE 1: COHORT DEFINITION]
- Entity: `organizations` (o) JOIN `subscriptions` (s) on `o.org_id = s.org_id`.
- Filters: `o.plan_name = 'Custom_OEM' AND s.start_date >= '2025-01-01' AND s.start_date < '2026-01-01'`.
- Cohort Grain: `DATE_TRUNC('month', s.start_date)`.
[PHASE 2: RETENTION EVALUATION]
- Month... | gold | curated_600_text2sql |
End of preview. Expand in Data Studio
π Enterprise Text-to-SQL & Analytical BI (Verbose CoT Reasoning)
This dataset contains 600 curated training records with in-depth, verbose 4-phase <Thinking> Chain-of-Thought reasoning, 100 frozen evaluation benchmark samples, and 50 frozen regression verification samples formatted in standard ChatML (messages) and Prompt-Target pairs, strictly following the Pioneer / Prometheus research paper 3-slice curriculum design.
π Dataset Composition & 3-Slice Breakdown
| Split | Rows | Proportion | Paper Design & Purpose |
|---|---|---|---|
train (Slice 1: Gold CoT) |
360 | 60.0% | Full domain context + verbose 4-phase <Thinking> Chain-of-Thought reasoning (Constraint Analysis, Formal Derivation, Numerical Gating, Implementation). |
train (Slice 2: Hard Negatives) |
180 | 30.0% | Contrastive edge-case disambiguation & boundary refutations (e.g. Non-existent columns, TLE quadratic overhead, Regulation E APP fraud boundaries). |
train (Slice 3: Replay Buffer) |
60 | 10.0% | Domain primitives & optimization anchors to prevent catastrophic forgetting. |
Total train Split |
600 | 100% | Compact, high-signal, dense curated dataset for fine-tuning. |
test (Frozen Eval) |
100 | β | Held-out benchmark with zero training contamination (eval_leakage = 0). |
regression (Baseline) |
50 | β | Baseline regression validation set. |
π‘οΈ 5-Point Quality Audit (100% Passed)
- Uniqueness:
100.0%unique prompts (600 / 600). - Zero Eval Leakage:
0prompt overlaps across train, test, and regression splits. - Replay Fraction:
10.0%dedicated to optimization and schema resilience.
π Usage with Unsloth / Hugging Face
from datasets import load_dataset
dataset = load_dataset("StarsMakeGalaxy/enterprise-text2sql-curated-600")
print(dataset)
- Downloads last month
- -