variant stringclasses 3
values | prompt stringlengths 163 234 | sql stringlengths 104 140 | metadata unknown | token_group stringclasses 2
values | id stringlengths 24 24 | split stringclasses 1
value |
|---|---|---|---|---|---|---|
v1 | Schema:
categories (alias: egiv)(code, name, level, status)
schedules(date, status, id, level)
Task: Find amount from categories where code appears in schedules entries with matching id.
SQL: | SELECT amount FROM categories AS egiv
WHERE code IN (
SELECT code FROM schedules AS vmob
WHERE vmob.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "schedules",
"outer_alias": "egiv",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_00700 | train |
v2 | Schema:
staff (alias: xnob)(value, type, amount, salary)
categories(id, amount, name, status)
Task: Find id from staff where a matching record exists in categories with the same id.
SQL: | SELECT id FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "categories",
"outer_alias": "xnob",
"inner_alias": "egiv",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_00701 | train |
v2 | Schema:
schedules (alias: vmob)(date, level, code, type)
sales(level, type, status, amount)
Task: Find amount from schedules where a matching record exists in sales with the same id.
SQL: | SELECT amount FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "sales",
"outer_alias": "vmob",
"inner_alias": "cif",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_00702 | train |
v2 | Schema:
tasks (alias: znob)(amount, salary, date, level)
transactions(name, code, amount, level)
Task: Retrieve value from tasks that have at least one corresponding entry in transactions sharing the same id.
SQL: | SELECT value FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "transactions",
"outer_alias": "znob",
"inner_alias": "gev",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_00703 | train |
v1 | Schema:
sales (alias: cif)(code, name, id, status)
regions(status, amount, name, level)
Task: Select amount from sales where level exists in regions for the same code.
SQL: | SELECT amount FROM sales AS cif
WHERE level IN (
SELECT level FROM regions AS okiv
WHERE okiv.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "regions",
"outer_alias": "cif",
"inner_alias": "okiv",
"proj_col": "amount",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00704 | train |
v1 | Schema:
products (alias: nad)(amount, type, id, status)
sales(value, level, name, date)
Task: Select salary from products where level exists in sales for the same type.
SQL: | SELECT salary FROM products AS nad
WHERE level IN (
SELECT level FROM sales AS cif
WHERE cif.type = nad.type
); | {
"outer_table": "products",
"inner_table": "sales",
"outer_alias": "nad",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00705 | train |
v3 | Schema:
transactions (alias: gev)(name, code, type, date)
staff(salary, level, id, status)
Task: Find salary from transactions where value exceeds the maximum value from staff for the same level.
SQL: | SELECT salary FROM transactions AS gev
WHERE value > (
SELECT MAX(value) FROM staff AS xnob
WHERE xnob.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "staff",
"outer_alias": "gev",
"inner_alias": "xnob",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00706 | train |
v1 | Schema:
accounts (alias: jac)(code, id, type, salary)
schedules(level, amount, status, value)
Task: Find id from accounts where type appears in schedules entries with matching type.
SQL: | SELECT id FROM accounts AS jac
WHERE type IN (
SELECT type FROM schedules AS vmob
WHERE vmob.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "schedules",
"outer_alias": "jac",
"inner_alias": "vmob",
"proj_col": "id",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00707 | train |
v3 | Schema:
departments (alias: dov)(type, name, date, value)
categories(status, amount, name, salary)
Task: Find value from departments where salary exceeds the total value from categories for the same id.
SQL: | SELECT value FROM departments AS dov
WHERE salary > (
SELECT SUM(value) FROM categories AS egiv
WHERE egiv.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "categories",
"outer_alias": "dov",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00708 | train |
v3 | Schema:
requests (alias: ejof)(amount, date, type, id)
schedules(name, date, level, code)
Task: Find salary from requests where salary exceeds the count of amount from schedules for the same type.
SQL: | SELECT salary FROM requests AS ejof
WHERE salary > (
SELECT COUNT(amount) FROM schedules AS vmob
WHERE vmob.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "schedules",
"outer_alias": "ejof",
"inner_alias": "vmob",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_00709 | train |
v3 | Schema:
customers (alias: lex)(date, code, status, amount)
products(id, value, name, level)
Task: Retrieve code from customers with value above the COUNT(salary) of products rows sharing the same code.
SQL: | SELECT code FROM customers AS lex
WHERE value > (
SELECT COUNT(salary) FROM products AS nad
WHERE nad.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "products",
"outer_alias": "lex",
"inner_alias": "nad",
"proj_col": "code",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00710 | train |
v3 | Schema:
schedules (alias: vmob)(name, value, type, status)
regions(type, code, date, value)
Task: Retrieve amount from schedules with amount above the SUM(amount) of regions rows sharing the same type.
SQL: | SELECT amount FROM schedules AS vmob
WHERE amount > (
SELECT SUM(amount) FROM regions AS okiv
WHERE okiv.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "regions",
"outer_alias": "vmob",
"inner_alias": "okiv",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_00711 | train |
v2 | Schema:
requests (alias: ejof)(value, amount, id, date)
regions(value, date, type, id)
Task: Find value from requests where a matching record exists in regions with the same code.
SQL: | SELECT value FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "regions",
"outer_alias": "ejof",
"inner_alias": "okiv",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_00712 | train |
v3 | Schema:
items (alias: ikob)(code, amount, value, id)
projects(code, level, type, amount)
Task: Retrieve salary from items with salary above the AVG(salary) of projects rows sharing the same status.
SQL: | SELECT salary FROM items AS ikob
WHERE salary > (
SELECT AVG(salary) FROM projects AS uliv
WHERE uliv.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "projects",
"outer_alias": "ikob",
"inner_alias": "uliv",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_00713 | train |
v3 | Schema:
products (alias: nad)(date, level, name, code)
staff(status, amount, type, salary)
Task: Find amount from products where salary exceeds the maximum value from staff for the same status.
SQL: | SELECT amount FROM products AS nad
WHERE salary > (
SELECT MAX(value) FROM staff AS xnob
WHERE xnob.status = nad.status
); | {
"outer_table": "products",
"inner_table": "staff",
"outer_alias": "nad",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00714 | train |
v2 | Schema:
shipments (alias: vnob)(type, salary, level, amount)
accounts(id, status, salary, level)
Task: Find code from shipments where a matching record exists in accounts with the same id.
SQL: | SELECT code FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "accounts",
"outer_alias": "vnob",
"inner_alias": "jac",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_00715 | train |
v1 | Schema:
departments (alias: dov)(code, name, salary, type)
requests(name, value, status, level)
Task: Select code from departments where type exists in requests for the same level.
SQL: | SELECT code FROM departments AS dov
WHERE type IN (
SELECT type FROM requests AS ejof
WHERE ejof.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "requests",
"outer_alias": "dov",
"inner_alias": "ejof",
"proj_col": "code",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00716 | train |
v3 | Schema:
items (alias: ikob)(level, value, salary, date)
projects(id, name, value, status)
Task: Find value from items where value exceeds the minimum salary from projects for the same level.
SQL: | SELECT value FROM items AS ikob
WHERE value > (
SELECT MIN(salary) FROM projects AS uliv
WHERE uliv.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "projects",
"outer_alias": "ikob",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_00717 | train |
v3 | Schema:
sales (alias: cif)(salary, code, amount, level)
transactions(type, code, value, name)
Task: Find id from sales where amount exceeds the maximum value from transactions for the same type.
SQL: | SELECT id FROM sales AS cif
WHERE amount > (
SELECT MAX(value) FROM transactions AS gev
WHERE gev.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "transactions",
"outer_alias": "cif",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00718 | train |
v3 | Schema:
categories (alias: egiv)(amount, salary, id, name)
invoices(date, value, name, salary)
Task: Find code from categories where amount exceeds the minimum salary from invoices for the same status.
SQL: | SELECT code FROM categories AS egiv
WHERE amount > (
SELECT MIN(salary) FROM invoices AS fal
WHERE fal.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "invoices",
"outer_alias": "egiv",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_00719 | train |
v3 | Schema:
sales (alias: cif)(date, value, code, level)
requests(value, status, amount, name)
Task: Find salary from sales where salary exceeds the average value from requests for the same status.
SQL: | SELECT salary FROM sales AS cif
WHERE salary > (
SELECT AVG(value) FROM requests AS ejof
WHERE ejof.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "requests",
"outer_alias": "cif",
"inner_alias": "ejof",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00720 | train |
v3 | Schema:
transactions (alias: gev)(name, date, value, status)
items(amount, name, salary, code)
Task: Find name from transactions where salary exceeds the minimum salary from items for the same id.
SQL: | SELECT name FROM transactions AS gev
WHERE salary > (
SELECT MIN(salary) FROM items AS ikob
WHERE ikob.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "items",
"outer_alias": "gev",
"inner_alias": "ikob",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00721 | train |
v3 | Schema:
invoices (alias: fal)(amount, value, date, name)
items(amount, salary, value, status)
Task: Find id from invoices where salary exceeds the maximum amount from items for the same type.
SQL: | SELECT id FROM invoices AS fal
WHERE salary > (
SELECT MAX(amount) FROM items AS ikob
WHERE ikob.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "items",
"outer_alias": "fal",
"inner_alias": "ikob",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00722 | train |
v1 | Schema:
schedules (alias: vmob)(type, name, date, value)
sales(level, status, name, value)
Task: Find id from schedules where level appears in sales entries with matching id.
SQL: | SELECT id FROM schedules AS vmob
WHERE level IN (
SELECT level FROM sales AS cif
WHERE cif.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "sales",
"outer_alias": "vmob",
"inner_alias": "cif",
"proj_col": "id",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_00723 | train |
v2 | Schema:
transactions (alias: gev)(date, salary, name, status)
accounts(id, date, level, name)
Task: Retrieve id from transactions that have at least one corresponding entry in accounts sharing the same id.
SQL: | SELECT id FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "accounts",
"outer_alias": "gev",
"inner_alias": "jac",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00724 | train |
v1 | Schema:
accounts (alias: jac)(status, amount, type, date)
orders(date, id, value, status)
Task: Find code from accounts where status appears in orders entries with matching id.
SQL: | SELECT code FROM accounts AS jac
WHERE status IN (
SELECT status FROM orders AS kab
WHERE kab.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "orders",
"outer_alias": "jac",
"inner_alias": "kab",
"proj_col": "code",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00725 | train |
v3 | Schema:
products (alias: nad)(amount, code, date, value)
tasks(id, name, status, date)
Task: Find amount from products where amount exceeds the total value from tasks for the same code.
SQL: | SELECT amount FROM products AS nad
WHERE amount > (
SELECT SUM(value) FROM tasks AS znob
WHERE znob.code = nad.code
); | {
"outer_table": "products",
"inner_table": "tasks",
"outer_alias": "nad",
"inner_alias": "znob",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00726 | train |
v2 | Schema:
tasks (alias: znob)(level, name, value, date)
branches(code, type, amount, level)
Task: Retrieve amount from tasks that have at least one corresponding entry in branches sharing the same status.
SQL: | SELECT amount FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "branches",
"outer_alias": "znob",
"inner_alias": "agov",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_00727 | train |
v2 | Schema:
employees (alias: bev)(level, name, code, value)
customers(salary, type, status, date)
Task: Find salary from employees where a matching record exists in customers with the same status.
SQL: | SELECT salary FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "customers",
"outer_alias": "bev",
"inner_alias": "lex",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00728 | train |
v2 | Schema:
departments (alias: dov)(date, value, salary, level)
transactions(type, status, level, salary)
Task: Find value from departments where a matching record exists in transactions with the same code.
SQL: | SELECT value FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "transactions",
"outer_alias": "dov",
"inner_alias": "gev",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00729 | train |
v1 | Schema:
tasks (alias: znob)(date, value, amount, level)
staff(id, salary, name, code)
Task: Select salary from tasks where status exists in staff for the same level.
SQL: | SELECT salary FROM tasks AS znob
WHERE status IN (
SELECT status FROM staff AS xnob
WHERE xnob.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "staff",
"outer_alias": "znob",
"inner_alias": "xnob",
"proj_col": "salary",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_00730 | train |
v1 | Schema:
shipments (alias: vnob)(name, status, code, date)
employees(salary, date, level, id)
Task: Select id from shipments where status exists in employees for the same code.
SQL: | SELECT id FROM shipments AS vnob
WHERE status IN (
SELECT status FROM employees AS bev
WHERE bev.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "employees",
"outer_alias": "vnob",
"inner_alias": "bev",
"proj_col": "id",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_00731 | train |
v2 | Schema:
branches (alias: agov)(status, id, salary, amount)
customers(value, amount, date, code)
Task: Find name from branches where a matching record exists in customers with the same id.
SQL: | SELECT name FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "customers",
"outer_alias": "agov",
"inner_alias": "lex",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_00732 | train |
v3 | Schema:
invoices (alias: fal)(date, salary, amount, level)
employees(status, salary, level, date)
Task: Retrieve salary from invoices with value above the SUM(salary) of employees rows sharing the same status.
SQL: | SELECT salary FROM invoices AS fal
WHERE value > (
SELECT SUM(salary) FROM employees AS bev
WHERE bev.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "employees",
"outer_alias": "fal",
"inner_alias": "bev",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00733 | train |
v1 | Schema:
invoices (alias: fal)(level, value, salary, type)
regions(amount, level, value, status)
Task: Select id from invoices where type exists in regions for the same code.
SQL: | SELECT id FROM invoices AS fal
WHERE type IN (
SELECT type FROM regions AS okiv
WHERE okiv.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "regions",
"outer_alias": "fal",
"inner_alias": "okiv",
"proj_col": "id",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00734 | train |
v1 | Schema:
employees (alias: bev)(status, amount, code, salary)
categories(date, amount, salary, value)
Task: Find salary from employees where level appears in categories entries with matching status.
SQL: | SELECT salary FROM employees AS bev
WHERE level IN (
SELECT level FROM categories AS egiv
WHERE egiv.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "categories",
"outer_alias": "bev",
"inner_alias": "egiv",
"proj_col": "salary",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00735 | train |
v2 | Schema:
categories (alias: egiv)(type, amount, salary, id)
orders(name, date, amount, id)
Task: Find code from categories where a matching record exists in orders with the same code.
SQL: | SELECT code FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "orders",
"outer_alias": "egiv",
"inner_alias": "kab",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_00736 | train |
v1 | Schema:
shipments (alias: vnob)(status, salary, id, type)
regions(name, date, code, amount)
Task: Select amount from shipments where level exists in regions for the same level.
SQL: | SELECT amount FROM shipments AS vnob
WHERE level IN (
SELECT level FROM regions AS okiv
WHERE okiv.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "regions",
"outer_alias": "vnob",
"inner_alias": "okiv",
"proj_col": "amount",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_00737 | train |
v3 | Schema:
projects (alias: uliv)(value, name, level, type)
regions(value, name, level, id)
Task: Find amount from projects where amount exceeds the count of value from regions for the same type.
SQL: | SELECT amount FROM projects AS uliv
WHERE amount > (
SELECT COUNT(value) FROM regions AS okiv
WHERE okiv.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "regions",
"outer_alias": "uliv",
"inner_alias": "okiv",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_00738 | train |
v2 | Schema:
schedules (alias: vmob)(amount, code, name, date)
customers(status, amount, salary, level)
Task: Find amount from schedules where a matching record exists in customers with the same level.
SQL: | SELECT amount FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "customers",
"outer_alias": "vmob",
"inner_alias": "lex",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_00739 | train |
v2 | Schema:
orders (alias: kab)(id, code, status, salary)
transactions(status, code, amount, date)
Task: Find salary from orders where a matching record exists in transactions with the same type.
SQL: | SELECT salary FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "transactions",
"outer_alias": "kab",
"inner_alias": "gev",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00740 | train |
v1 | Schema:
regions (alias: okiv)(value, type, name, amount)
customers(code, status, name, amount)
Task: Retrieve code from regions whose status is found in customers rows where type matches the outer record.
SQL: | SELECT code FROM regions AS okiv
WHERE status IN (
SELECT status FROM customers AS lex
WHERE lex.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "customers",
"outer_alias": "okiv",
"inner_alias": "lex",
"proj_col": "code",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_00741 | train |
v1 | Schema:
branches (alias: agov)(code, amount, status, value)
products(name, date, level, type)
Task: Find code from branches where type appears in products entries with matching code.
SQL: | SELECT code FROM branches AS agov
WHERE type IN (
SELECT type FROM products AS nad
WHERE nad.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "products",
"outer_alias": "agov",
"inner_alias": "nad",
"proj_col": "code",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_00742 | train |
v3 | Schema:
requests (alias: ejof)(level, amount, code, value)
orders(code, status, name, type)
Task: Find amount from requests where amount exceeds the minimum salary from orders for the same status.
SQL: | SELECT amount FROM requests AS ejof
WHERE amount > (
SELECT MIN(salary) FROM orders AS kab
WHERE kab.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "orders",
"outer_alias": "ejof",
"inner_alias": "kab",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_00743 | train |
v1 | Schema:
categories (alias: egiv)(date, level, code, salary)
schedules(code, id, value, level)
Task: Find amount from categories where status appears in schedules entries with matching id.
SQL: | SELECT amount FROM categories AS egiv
WHERE status IN (
SELECT status FROM schedules AS vmob
WHERE vmob.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "schedules",
"outer_alias": "egiv",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_00744 | train |
v1 | Schema:
sales (alias: cif)(level, date, name, id)
branches(type, date, salary, id)
Task: Retrieve id from sales whose status is found in branches rows where level matches the outer record.
SQL: | SELECT id FROM sales AS cif
WHERE status IN (
SELECT status FROM branches AS agov
WHERE agov.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "branches",
"outer_alias": "cif",
"inner_alias": "agov",
"proj_col": "id",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00745 | train |
v2 | Schema:
accounts (alias: jac)(id, status, type, value)
sales(amount, level, date, type)
Task: Retrieve code from accounts that have at least one corresponding entry in sales sharing the same level.
SQL: | SELECT code FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "sales",
"outer_alias": "jac",
"inner_alias": "cif",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00746 | train |
v3 | Schema:
managers (alias: hac)(code, date, level, type)
invoices(level, code, date, value)
Task: Find name from managers where value exceeds the maximum amount from invoices for the same code.
SQL: | SELECT name FROM managers AS hac
WHERE value > (
SELECT MAX(amount) FROM invoices AS fal
WHERE fal.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "invoices",
"outer_alias": "hac",
"inner_alias": "fal",
"proj_col": "name",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00747 | train |
v3 | Schema:
categories (alias: egiv)(value, amount, status, type)
accounts(amount, status, value, id)
Task: Find amount from categories where salary exceeds the minimum value from accounts for the same level.
SQL: | SELECT amount FROM categories AS egiv
WHERE salary > (
SELECT MIN(value) FROM accounts AS jac
WHERE jac.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "accounts",
"outer_alias": "egiv",
"inner_alias": "jac",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_00748 | train |
v1 | Schema:
customers (alias: lex)(amount, type, salary, level)
items(id, salary, status, name)
Task: Retrieve id from customers whose level is found in items rows where type matches the outer record.
SQL: | SELECT id FROM customers AS lex
WHERE level IN (
SELECT level FROM items AS ikob
WHERE ikob.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "items",
"outer_alias": "lex",
"inner_alias": "ikob",
"proj_col": "id",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00749 | train |
v2 | Schema:
sales (alias: cif)(value, amount, level, id)
employees(salary, id, value, status)
Task: Find id from sales where a matching record exists in employees with the same id.
SQL: | SELECT id FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "employees",
"outer_alias": "cif",
"inner_alias": "bev",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00750 | train |
v2 | Schema:
employees (alias: bev)(status, name, amount, id)
categories(code, amount, id, value)
Task: Find value from employees where a matching record exists in categories with the same type.
SQL: | SELECT value FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "categories",
"outer_alias": "bev",
"inner_alias": "egiv",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00751 | train |
v3 | Schema:
categories (alias: egiv)(value, amount, date, type)
projects(salary, level, id, name)
Task: Find amount from categories where value exceeds the count of value from projects for the same code.
SQL: | SELECT amount FROM categories AS egiv
WHERE value > (
SELECT COUNT(value) FROM projects AS uliv
WHERE uliv.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "projects",
"outer_alias": "egiv",
"inner_alias": "uliv",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_00752 | train |
v3 | Schema:
tasks (alias: znob)(name, status, level, type)
accounts(name, code, id, amount)
Task: Find salary from tasks where salary exceeds the minimum amount from accounts for the same level.
SQL: | SELECT salary FROM tasks AS znob
WHERE salary > (
SELECT MIN(amount) FROM accounts AS jac
WHERE jac.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "accounts",
"outer_alias": "znob",
"inner_alias": "jac",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_00753 | train |
v2 | Schema:
products (alias: nad)(value, level, amount, type)
accounts(level, id, name, value)
Task: Find id from products where a matching record exists in accounts with the same level.
SQL: | SELECT id FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.level = nad.level
); | {
"outer_table": "products",
"inner_table": "accounts",
"outer_alias": "nad",
"inner_alias": "jac",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00754 | train |
v2 | Schema:
requests (alias: ejof)(id, amount, date, type)
branches(amount, name, type, value)
Task: Retrieve name from requests that have at least one corresponding entry in branches sharing the same id.
SQL: | SELECT name FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "branches",
"outer_alias": "ejof",
"inner_alias": "agov",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_00755 | train |
v3 | Schema:
schedules (alias: vmob)(type, value, amount, name)
staff(type, amount, status, name)
Task: Retrieve name from schedules with salary above the SUM(salary) of staff rows sharing the same id.
SQL: | SELECT name FROM schedules AS vmob
WHERE salary > (
SELECT SUM(salary) FROM staff AS xnob
WHERE xnob.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "staff",
"outer_alias": "vmob",
"inner_alias": "xnob",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_00756 | train |
v1 | Schema:
departments (alias: dov)(value, date, name, code)
staff(value, status, type, salary)
Task: Select code from departments where code exists in staff for the same id.
SQL: | SELECT code FROM departments AS dov
WHERE code IN (
SELECT code FROM staff AS xnob
WHERE xnob.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "staff",
"outer_alias": "dov",
"inner_alias": "xnob",
"proj_col": "code",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00757 | train |
v2 | Schema:
branches (alias: agov)(status, salary, value, date)
customers(level, id, type, value)
Task: Find value from branches where a matching record exists in customers with the same type.
SQL: | SELECT value FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "customers",
"outer_alias": "agov",
"inner_alias": "lex",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_00758 | train |
v1 | Schema:
tasks (alias: znob)(name, id, status, level)
products(level, date, amount, id)
Task: Retrieve name from tasks whose code is found in products rows where code matches the outer record.
SQL: | SELECT name FROM tasks AS znob
WHERE code IN (
SELECT code FROM products AS nad
WHERE nad.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "products",
"outer_alias": "znob",
"inner_alias": "nad",
"proj_col": "name",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_00759 | train |
v3 | Schema:
shipments (alias: vnob)(level, date, amount, type)
products(status, date, id, level)
Task: Retrieve value from shipments with value above the COUNT(amount) of products rows sharing the same status.
SQL: | SELECT value FROM shipments AS vnob
WHERE value > (
SELECT COUNT(amount) FROM products AS nad
WHERE nad.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "products",
"outer_alias": "vnob",
"inner_alias": "nad",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_00760 | train |
v3 | Schema:
invoices (alias: fal)(type, amount, date, status)
regions(name, amount, salary, status)
Task: Find id from invoices where amount exceeds the minimum amount from regions for the same level.
SQL: | SELECT id FROM invoices AS fal
WHERE amount > (
SELECT MIN(amount) FROM regions AS okiv
WHERE okiv.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "regions",
"outer_alias": "fal",
"inner_alias": "okiv",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00761 | train |
v1 | Schema:
orders (alias: kab)(level, value, amount, name)
staff(salary, status, name, date)
Task: Retrieve value from orders whose id is found in staff rows where type matches the outer record.
SQL: | SELECT value FROM orders AS kab
WHERE id IN (
SELECT id FROM staff AS xnob
WHERE xnob.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "staff",
"outer_alias": "kab",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00762 | train |
v1 | Schema:
orders (alias: kab)(date, amount, value, level)
transactions(salary, date, status, level)
Task: Select id from orders where status exists in transactions for the same id.
SQL: | SELECT id FROM orders AS kab
WHERE status IN (
SELECT status FROM transactions AS gev
WHERE gev.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "transactions",
"outer_alias": "kab",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00763 | train |
v2 | Schema:
items (alias: ikob)(salary, code, date, level)
invoices(level, code, id, name)
Task: Find value from items where a matching record exists in invoices with the same type.
SQL: | SELECT value FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "invoices",
"outer_alias": "ikob",
"inner_alias": "fal",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_00764 | train |
v2 | Schema:
invoices (alias: fal)(name, status, code, amount)
transactions(id, type, level, status)
Task: Retrieve id from invoices that have at least one corresponding entry in transactions sharing the same type.
SQL: | SELECT id FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "transactions",
"outer_alias": "fal",
"inner_alias": "gev",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00765 | train |
v3 | Schema:
items (alias: ikob)(name, code, value, date)
customers(amount, status, salary, name)
Task: Retrieve name from items with amount above the MIN(salary) of customers rows sharing the same code.
SQL: | SELECT name FROM items AS ikob
WHERE amount > (
SELECT MIN(salary) FROM customers AS lex
WHERE lex.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "customers",
"outer_alias": "ikob",
"inner_alias": "lex",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_00766 | train |
v2 | Schema:
orders (alias: kab)(amount, name, code, type)
categories(date, code, value, id)
Task: Find amount from orders where a matching record exists in categories with the same type.
SQL: | SELECT amount FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "categories",
"outer_alias": "kab",
"inner_alias": "egiv",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00767 | train |
v1 | Schema:
orders (alias: kab)(date, salary, amount, level)
staff(salary, level, status, type)
Task: Find value from orders where id appears in staff entries with matching level.
SQL: | SELECT value FROM orders AS kab
WHERE id IN (
SELECT id FROM staff AS xnob
WHERE xnob.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "staff",
"outer_alias": "kab",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00768 | train |
v2 | Schema:
customers (alias: lex)(amount, code, salary, id)
orders(id, date, level, status)
Task: Retrieve code from customers that have at least one corresponding entry in orders sharing the same type.
SQL: | SELECT code FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "orders",
"outer_alias": "lex",
"inner_alias": "kab",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00769 | train |
v2 | Schema:
managers (alias: hac)(status, date, id, amount)
employees(value, amount, code, level)
Task: Retrieve salary from managers that have at least one corresponding entry in employees sharing the same id.
SQL: | SELECT salary FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "employees",
"outer_alias": "hac",
"inner_alias": "bev",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00770 | train |
v3 | Schema:
regions (alias: okiv)(value, salary, code, id)
orders(amount, type, id, name)
Task: Find salary from regions where salary exceeds the average salary from orders for the same code.
SQL: | SELECT salary FROM regions AS okiv
WHERE salary > (
SELECT AVG(salary) FROM orders AS kab
WHERE kab.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "orders",
"outer_alias": "okiv",
"inner_alias": "kab",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_00771 | train |
v2 | Schema:
staff (alias: xnob)(type, salary, level, id)
regions(id, date, level, salary)
Task: Find id from staff where a matching record exists in regions with the same status.
SQL: | SELECT id FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "regions",
"outer_alias": "xnob",
"inner_alias": "okiv",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_00772 | train |
v3 | Schema:
branches (alias: agov)(status, amount, name, type)
transactions(status, amount, type, date)
Task: Retrieve code from branches with value above the MIN(value) of transactions rows sharing the same id.
SQL: | SELECT code FROM branches AS agov
WHERE value > (
SELECT MIN(value) FROM transactions AS gev
WHERE gev.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "transactions",
"outer_alias": "agov",
"inner_alias": "gev",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_00773 | train |
v1 | Schema:
staff (alias: xnob)(date, code, status, salary)
categories(level, code, name, status)
Task: Find amount from staff where id appears in categories entries with matching level.
SQL: | SELECT amount FROM staff AS xnob
WHERE id IN (
SELECT id FROM categories AS egiv
WHERE egiv.level = xnob.level
); | {
"outer_table": "staff",
"inner_table": "categories",
"outer_alias": "xnob",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "xnob.level",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_00774 | train |
v2 | Schema:
employees (alias: bev)(status, date, code, id)
departments(type, value, id, level)
Task: Retrieve amount from employees that have at least one corresponding entry in departments sharing the same code.
SQL: | SELECT amount FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "departments",
"outer_alias": "bev",
"inner_alias": "dov",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00775 | train |
v2 | Schema:
invoices (alias: fal)(type, level, code, amount)
employees(code, value, status, amount)
Task: Retrieve amount from invoices that have at least one corresponding entry in employees sharing the same level.
SQL: | SELECT amount FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "employees",
"outer_alias": "fal",
"inner_alias": "bev",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00776 | train |
v1 | Schema:
accounts (alias: jac)(type, salary, status, name)
staff(code, value, name, salary)
Task: Find salary from accounts where status appears in staff entries with matching id.
SQL: | SELECT salary FROM accounts AS jac
WHERE status IN (
SELECT status FROM staff AS xnob
WHERE xnob.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "staff",
"outer_alias": "jac",
"inner_alias": "xnob",
"proj_col": "salary",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00777 | train |
v2 | Schema:
orders (alias: kab)(type, level, amount, value)
departments(name, level, amount, value)
Task: Find id from orders where a matching record exists in departments with the same id.
SQL: | SELECT id FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "departments",
"outer_alias": "kab",
"inner_alias": "dov",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00778 | train |
v3 | Schema:
items (alias: ikob)(code, salary, id, amount)
invoices(level, status, type, value)
Task: Retrieve value from items with value above the SUM(amount) of invoices rows sharing the same status.
SQL: | SELECT value FROM items AS ikob
WHERE value > (
SELECT SUM(amount) FROM invoices AS fal
WHERE fal.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "invoices",
"outer_alias": "ikob",
"inner_alias": "fal",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_00779 | train |
v2 | Schema:
transactions (alias: gev)(value, name, code, level)
schedules(id, code, level, salary)
Task: Retrieve salary from transactions that have at least one corresponding entry in schedules sharing the same code.
SQL: | SELECT salary FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "schedules",
"outer_alias": "gev",
"inner_alias": "vmob",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00780 | train |
v3 | Schema:
departments (alias: dov)(status, amount, type, name)
employees(code, salary, date, amount)
Task: Retrieve value from departments with amount above the AVG(salary) of employees rows sharing the same type.
SQL: | SELECT value FROM departments AS dov
WHERE amount > (
SELECT AVG(salary) FROM employees AS bev
WHERE bev.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "employees",
"outer_alias": "dov",
"inner_alias": "bev",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00781 | train |
v1 | Schema:
projects (alias: uliv)(code, level, name, id)
schedules(amount, type, status, code)
Task: Select salary from projects where id exists in schedules for the same id.
SQL: | SELECT salary FROM projects AS uliv
WHERE id IN (
SELECT id FROM schedules AS vmob
WHERE vmob.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "schedules",
"outer_alias": "uliv",
"inner_alias": "vmob",
"proj_col": "salary",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_00782 | train |
v2 | Schema:
regions (alias: okiv)(code, level, name, amount)
projects(salary, value, amount, id)
Task: Find value from regions where a matching record exists in projects with the same type.
SQL: | SELECT value FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "projects",
"outer_alias": "okiv",
"inner_alias": "uliv",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_00783 | train |
v2 | Schema:
customers (alias: lex)(status, code, type, salary)
accounts(code, type, salary, date)
Task: Find id from customers where a matching record exists in accounts with the same level.
SQL: | SELECT id FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "accounts",
"outer_alias": "lex",
"inner_alias": "jac",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00784 | train |
v3 | Schema:
invoices (alias: fal)(level, amount, salary, status)
staff(type, name, code, value)
Task: Find salary from invoices where salary exceeds the average salary from staff for the same type.
SQL: | SELECT salary FROM invoices AS fal
WHERE salary > (
SELECT AVG(salary) FROM staff AS xnob
WHERE xnob.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "staff",
"outer_alias": "fal",
"inner_alias": "xnob",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00785 | train |
v3 | Schema:
tasks (alias: znob)(level, value, id, salary)
employees(salary, level, type, status)
Task: Retrieve value from tasks with salary above the MAX(amount) of employees rows sharing the same type.
SQL: | SELECT value FROM tasks AS znob
WHERE salary > (
SELECT MAX(amount) FROM employees AS bev
WHERE bev.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "employees",
"outer_alias": "znob",
"inner_alias": "bev",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_00786 | train |
v1 | Schema:
shipments (alias: vnob)(level, code, value, amount)
orders(id, value, type, name)
Task: Retrieve code from shipments whose code is found in orders rows where status matches the outer record.
SQL: | SELECT code FROM shipments AS vnob
WHERE code IN (
SELECT code FROM orders AS kab
WHERE kab.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "orders",
"outer_alias": "vnob",
"inner_alias": "kab",
"proj_col": "code",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_00787 | train |
v3 | Schema:
products (alias: nad)(status, amount, code, level)
departments(value, code, level, id)
Task: Retrieve name from products with salary above the COUNT(salary) of departments rows sharing the same code.
SQL: | SELECT name FROM products AS nad
WHERE salary > (
SELECT COUNT(salary) FROM departments AS dov
WHERE dov.code = nad.code
); | {
"outer_table": "products",
"inner_table": "departments",
"outer_alias": "nad",
"inner_alias": "dov",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00788 | train |
v1 | Schema:
requests (alias: ejof)(status, level, type, name)
transactions(salary, value, name, status)
Task: Select name from requests where status exists in transactions for the same code.
SQL: | SELECT name FROM requests AS ejof
WHERE status IN (
SELECT status FROM transactions AS gev
WHERE gev.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "transactions",
"outer_alias": "ejof",
"inner_alias": "gev",
"proj_col": "name",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_00789 | train |
v1 | Schema:
items (alias: ikob)(status, type, code, level)
products(id, status, code, type)
Task: Retrieve salary from items whose code is found in products rows where id matches the outer record.
SQL: | SELECT salary FROM items AS ikob
WHERE code IN (
SELECT code FROM products AS nad
WHERE nad.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "products",
"outer_alias": "ikob",
"inner_alias": "nad",
"proj_col": "salary",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_00790 | train |
v2 | Schema:
employees (alias: bev)(status, amount, id, type)
branches(salary, status, type, id)
Task: Find salary from employees where a matching record exists in branches with the same code.
SQL: | SELECT salary FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "branches",
"outer_alias": "bev",
"inner_alias": "agov",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00791 | train |
v2 | Schema:
accounts (alias: jac)(code, value, status, type)
branches(level, id, status, code)
Task: Retrieve amount from accounts that have at least one corresponding entry in branches sharing the same id.
SQL: | SELECT amount FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "branches",
"outer_alias": "jac",
"inner_alias": "agov",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00792 | train |
v1 | Schema:
requests (alias: ejof)(salary, type, code, date)
items(salary, id, value, amount)
Task: Retrieve amount from requests whose level is found in items rows where level matches the outer record.
SQL: | SELECT amount FROM requests AS ejof
WHERE level IN (
SELECT level FROM items AS ikob
WHERE ikob.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "items",
"outer_alias": "ejof",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_00793 | train |
v1 | Schema:
schedules (alias: vmob)(code, level, status, amount)
categories(value, status, code, date)
Task: Select value from schedules where code exists in categories for the same type.
SQL: | SELECT value FROM schedules AS vmob
WHERE code IN (
SELECT code FROM categories AS egiv
WHERE egiv.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "categories",
"outer_alias": "vmob",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_00794 | train |
v2 | Schema:
categories (alias: egiv)(value, salary, type, id)
orders(amount, value, type, salary)
Task: Find value from categories where a matching record exists in orders with the same level.
SQL: | SELECT value FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "orders",
"outer_alias": "egiv",
"inner_alias": "kab",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_00795 | train |
v3 | Schema:
employees (alias: bev)(value, status, name, type)
accounts(code, level, value, amount)
Task: Retrieve code from employees with value above the MAX(amount) of accounts rows sharing the same status.
SQL: | SELECT code FROM employees AS bev
WHERE value > (
SELECT MAX(amount) FROM accounts AS jac
WHERE jac.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "accounts",
"outer_alias": "bev",
"inner_alias": "jac",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00796 | train |
v1 | Schema:
schedules (alias: vmob)(code, amount, status, date)
regions(value, date, type, level)
Task: Retrieve id from schedules whose id is found in regions rows where type matches the outer record.
SQL: | SELECT id FROM schedules AS vmob
WHERE id IN (
SELECT id FROM regions AS okiv
WHERE okiv.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "regions",
"outer_alias": "vmob",
"inner_alias": "okiv",
"proj_col": "id",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_00797 | train |
v2 | Schema:
staff (alias: xnob)(value, level, salary, amount)
sales(amount, id, code, status)
Task: Find name from staff where a matching record exists in sales with the same status.
SQL: | SELECT name FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "sales",
"outer_alias": "xnob",
"inner_alias": "cif",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_00798 | train |
v3 | Schema:
orders (alias: kab)(status, salary, value, id)
regions(salary, name, date, id)
Task: Retrieve value from orders with value above the MIN(amount) of regions rows sharing the same type.
SQL: | SELECT value FROM orders AS kab
WHERE value > (
SELECT MIN(amount) FROM regions AS okiv
WHERE okiv.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "regions",
"outer_alias": "kab",
"inner_alias": "okiv",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00799 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.