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 |
|---|---|---|---|---|---|---|
v2 | Schema:
invoices (alias: fal)(level, code, salary, type)
categories(id, amount, salary, status)
Task: Find salary from invoices where a matching record exists in categories with the same code.
SQL: | SELECT salary FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "categories",
"outer_alias": "fal",
"inner_alias": "egiv",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09100 | train |
v3 | Schema:
schedules (alias: vmob)(id, status, value, date)
orders(amount, code, date, value)
Task: Find id from schedules where value exceeds the count of amount from orders for the same id.
SQL: | SELECT id FROM schedules AS vmob
WHERE value > (
SELECT COUNT(amount) FROM orders AS kab
WHERE kab.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "orders",
"outer_alias": "vmob",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_09101 | train |
v2 | Schema:
shipments (alias: vnob)(code, value, salary, type)
staff(salary, code, value, type)
Task: Retrieve salary from shipments that have at least one corresponding entry in staff sharing the same type.
SQL: | SELECT salary FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "staff",
"outer_alias": "vnob",
"inner_alias": "xnob",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_09102 | train |
v1 | Schema:
orders (alias: kab)(name, salary, level, code)
tasks(name, salary, id, amount)
Task: Select amount from orders where type exists in tasks for the same type.
SQL: | SELECT amount FROM orders AS kab
WHERE type IN (
SELECT type FROM tasks AS znob
WHERE znob.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "tasks",
"outer_alias": "kab",
"inner_alias": "znob",
"proj_col": "amount",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09103 | train |
v2 | Schema:
projects (alias: uliv)(amount, value, code, type)
staff(level, name, salary, amount)
Task: Find salary from projects where a matching record exists in staff with the same level.
SQL: | SELECT salary FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "staff",
"outer_alias": "uliv",
"inner_alias": "xnob",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_09104 | train |
v2 | Schema:
customers (alias: lex)(code, date, value, status)
requests(type, level, salary, id)
Task: Find name from customers where a matching record exists in requests with the same level.
SQL: | SELECT name FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "requests",
"outer_alias": "lex",
"inner_alias": "ejof",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09105 | train |
v1 | Schema:
transactions (alias: gev)(status, amount, level, value)
sales(value, name, type, id)
Task: Find id from transactions where level appears in sales entries with matching id.
SQL: | SELECT id FROM transactions AS gev
WHERE level IN (
SELECT level FROM sales AS cif
WHERE cif.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "sales",
"outer_alias": "gev",
"inner_alias": "cif",
"proj_col": "id",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09106 | train |
v3 | Schema:
employees (alias: bev)(type, status, date, amount)
shipments(date, salary, name, type)
Task: Retrieve value from employees with salary above the SUM(value) of shipments rows sharing the same level.
SQL: | SELECT value FROM employees AS bev
WHERE salary > (
SELECT SUM(value) FROM shipments AS vnob
WHERE vnob.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "shipments",
"outer_alias": "bev",
"inner_alias": "vnob",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09107 | train |
v3 | Schema:
requests (alias: ejof)(type, value, amount, code)
departments(id, status, salary, date)
Task: Retrieve name from requests with salary above the MIN(amount) of departments rows sharing the same status.
SQL: | SELECT name FROM requests AS ejof
WHERE salary > (
SELECT MIN(amount) FROM departments AS dov
WHERE dov.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "departments",
"outer_alias": "ejof",
"inner_alias": "dov",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_09108 | train |
v3 | Schema:
customers (alias: lex)(value, name, type, id)
items(name, salary, status, type)
Task: Find name from customers where amount exceeds the average value from items for the same id.
SQL: | SELECT name FROM customers AS lex
WHERE amount > (
SELECT AVG(value) FROM items AS ikob
WHERE ikob.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "items",
"outer_alias": "lex",
"inner_alias": "ikob",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09109 | train |
v1 | Schema:
employees (alias: bev)(amount, date, code, salary)
branches(amount, value, date, name)
Task: Select id from employees where id exists in branches for the same id.
SQL: | SELECT id FROM employees AS bev
WHERE id IN (
SELECT id FROM branches AS agov
WHERE agov.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "branches",
"outer_alias": "bev",
"inner_alias": "agov",
"proj_col": "id",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09110 | train |
v1 | Schema:
accounts (alias: jac)(date, code, name, status)
items(value, salary, date, status)
Task: Retrieve name from accounts whose status is found in items rows where type matches the outer record.
SQL: | SELECT name FROM accounts AS jac
WHERE status IN (
SELECT status FROM items AS ikob
WHERE ikob.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "items",
"outer_alias": "jac",
"inner_alias": "ikob",
"proj_col": "name",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09111 | train |
v3 | Schema:
transactions (alias: gev)(level, id, name, status)
branches(value, type, code, date)
Task: Retrieve code from transactions with salary above the COUNT(salary) of branches rows sharing the same id.
SQL: | SELECT code FROM transactions AS gev
WHERE salary > (
SELECT COUNT(salary) FROM branches AS agov
WHERE agov.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "branches",
"outer_alias": "gev",
"inner_alias": "agov",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09112 | train |
v3 | Schema:
managers (alias: hac)(status, date, type, value)
transactions(name, amount, level, date)
Task: Find name from managers where value exceeds the count of salary from transactions for the same type.
SQL: | SELECT name FROM managers AS hac
WHERE value > (
SELECT COUNT(salary) FROM transactions AS gev
WHERE gev.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "transactions",
"outer_alias": "hac",
"inner_alias": "gev",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09113 | train |
v1 | Schema:
managers (alias: hac)(salary, value, date, name)
categories(code, amount, value, id)
Task: Find value from managers where id appears in categories entries with matching type.
SQL: | SELECT value FROM managers AS hac
WHERE id IN (
SELECT id FROM categories AS egiv
WHERE egiv.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "categories",
"outer_alias": "hac",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09114 | train |
v3 | Schema:
staff (alias: xnob)(salary, name, type, code)
orders(code, id, status, type)
Task: Retrieve code from staff with amount above the AVG(amount) of orders rows sharing the same id.
SQL: | SELECT code FROM staff AS xnob
WHERE amount > (
SELECT AVG(amount) FROM orders AS kab
WHERE kab.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "orders",
"outer_alias": "xnob",
"inner_alias": "kab",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_09115 | train |
v1 | Schema:
schedules (alias: vmob)(salary, date, code, id)
requests(code, value, type, id)
Task: Retrieve name from schedules whose id is found in requests rows where type matches the outer record.
SQL: | SELECT name FROM schedules AS vmob
WHERE id IN (
SELECT id FROM requests AS ejof
WHERE ejof.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "requests",
"outer_alias": "vmob",
"inner_alias": "ejof",
"proj_col": "name",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_09116 | train |
v3 | Schema:
regions (alias: okiv)(status, code, date, level)
tasks(name, code, amount, type)
Task: Retrieve value from regions with value above the SUM(value) of tasks rows sharing the same code.
SQL: | SELECT value FROM regions AS okiv
WHERE value > (
SELECT SUM(value) FROM tasks AS znob
WHERE znob.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "tasks",
"outer_alias": "okiv",
"inner_alias": "znob",
"proj_col": "value",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_09117 | train |
v1 | Schema:
projects (alias: uliv)(status, id, level, amount)
items(id, date, name, value)
Task: Retrieve value from projects whose id is found in items rows where id matches the outer record.
SQL: | SELECT value FROM projects AS uliv
WHERE id IN (
SELECT id FROM items AS ikob
WHERE ikob.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "items",
"outer_alias": "uliv",
"inner_alias": "ikob",
"proj_col": "value",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_09118 | train |
v2 | Schema:
staff (alias: xnob)(date, salary, type, code)
tasks(status, name, amount, level)
Task: Retrieve amount from staff that have at least one corresponding entry in tasks sharing the same status.
SQL: | SELECT amount FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "tasks",
"outer_alias": "xnob",
"inner_alias": "znob",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_09119 | train |
v1 | Schema:
accounts (alias: jac)(level, value, amount, salary)
sales(status, name, level, salary)
Task: Find amount from accounts where level appears in sales entries with matching status.
SQL: | SELECT amount FROM accounts AS jac
WHERE level IN (
SELECT level FROM sales AS cif
WHERE cif.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "sales",
"outer_alias": "jac",
"inner_alias": "cif",
"proj_col": "amount",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09120 | train |
v3 | Schema:
customers (alias: lex)(code, date, type, id)
invoices(status, id, code, name)
Task: Retrieve value from customers with amount above the COUNT(amount) of invoices rows sharing the same code.
SQL: | SELECT value FROM customers AS lex
WHERE amount > (
SELECT COUNT(amount) FROM invoices AS fal
WHERE fal.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "invoices",
"outer_alias": "lex",
"inner_alias": "fal",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09121 | train |
v3 | Schema:
shipments (alias: vnob)(name, id, salary, status)
managers(salary, id, code, amount)
Task: Find id from shipments where salary exceeds the total amount from managers for the same code.
SQL: | SELECT id FROM shipments AS vnob
WHERE salary > (
SELECT SUM(amount) FROM managers AS hac
WHERE hac.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "managers",
"outer_alias": "vnob",
"inner_alias": "hac",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_09122 | train |
v1 | Schema:
managers (alias: hac)(date, name, code, amount)
regions(level, id, amount, name)
Task: Select name from managers where level exists in regions for the same level.
SQL: | SELECT name FROM managers AS hac
WHERE level IN (
SELECT level FROM regions AS okiv
WHERE okiv.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "regions",
"outer_alias": "hac",
"inner_alias": "okiv",
"proj_col": "name",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09123 | train |
v1 | Schema:
departments (alias: dov)(level, type, code, amount)
transactions(id, code, name, status)
Task: Find code from departments where code appears in transactions entries with matching id.
SQL: | SELECT code FROM departments AS dov
WHERE code IN (
SELECT code FROM transactions AS gev
WHERE gev.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "transactions",
"outer_alias": "dov",
"inner_alias": "gev",
"proj_col": "code",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09124 | train |
v1 | Schema:
sales (alias: cif)(type, value, date, amount)
transactions(type, salary, date, name)
Task: Retrieve name from sales whose code is found in transactions rows where status matches the outer record.
SQL: | SELECT name FROM sales AS cif
WHERE code IN (
SELECT code FROM transactions AS gev
WHERE gev.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "transactions",
"outer_alias": "cif",
"inner_alias": "gev",
"proj_col": "name",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09125 | train |
v3 | Schema:
employees (alias: bev)(amount, type, value, status)
staff(amount, level, salary, status)
Task: Find code from employees where salary exceeds the maximum value from staff for the same code.
SQL: | SELECT code FROM employees AS bev
WHERE salary > (
SELECT MAX(value) FROM staff AS xnob
WHERE xnob.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "staff",
"outer_alias": "bev",
"inner_alias": "xnob",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09126 | train |
v2 | Schema:
departments (alias: dov)(id, salary, type, amount)
projects(salary, name, date, code)
Task: Find name from departments where a matching record exists in projects with the same status.
SQL: | SELECT name FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "projects",
"outer_alias": "dov",
"inner_alias": "uliv",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09127 | train |
v1 | Schema:
transactions (alias: gev)(type, code, value, salary)
accounts(name, value, id, level)
Task: Retrieve amount from transactions whose code is found in accounts rows where status matches the outer record.
SQL: | SELECT amount FROM transactions AS gev
WHERE code IN (
SELECT code FROM accounts AS jac
WHERE jac.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "accounts",
"outer_alias": "gev",
"inner_alias": "jac",
"proj_col": "amount",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09128 | train |
v3 | Schema:
items (alias: ikob)(status, value, amount, id)
invoices(status, date, value, level)
Task: Retrieve amount from items with amount above the COUNT(value) of invoices rows sharing the same level.
SQL: | SELECT amount FROM items AS ikob
WHERE amount > (
SELECT COUNT(value) FROM invoices AS fal
WHERE fal.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "invoices",
"outer_alias": "ikob",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_09129 | train |
v2 | Schema:
orders (alias: kab)(level, salary, name, date)
schedules(amount, code, type, value)
Task: Find value from orders where a matching record exists in schedules with the same code.
SQL: | SELECT value FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "schedules",
"outer_alias": "kab",
"inner_alias": "vmob",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09130 | train |
v1 | Schema:
customers (alias: lex)(amount, name, level, date)
branches(id, salary, value, amount)
Task: Retrieve name from customers whose id is found in branches rows where id matches the outer record.
SQL: | SELECT name FROM customers AS lex
WHERE id IN (
SELECT id FROM branches AS agov
WHERE agov.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "branches",
"outer_alias": "lex",
"inner_alias": "agov",
"proj_col": "name",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09131 | train |
v3 | Schema:
tasks (alias: znob)(date, status, name, type)
orders(status, value, name, date)
Task: Find value from tasks where amount exceeds the average amount from orders for the same id.
SQL: | SELECT value FROM tasks AS znob
WHERE amount > (
SELECT AVG(amount) FROM orders AS kab
WHERE kab.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "orders",
"outer_alias": "znob",
"inner_alias": "kab",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_09132 | train |
v1 | Schema:
items (alias: ikob)(name, code, status, salary)
invoices(id, value, status, date)
Task: Retrieve amount from items whose code is found in invoices rows where type matches the outer record.
SQL: | SELECT amount FROM items AS ikob
WHERE code IN (
SELECT code FROM invoices AS fal
WHERE fal.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "invoices",
"outer_alias": "ikob",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_09133 | train |
v2 | Schema:
branches (alias: agov)(status, id, date, amount)
categories(salary, value, date, type)
Task: Retrieve salary from branches that have at least one corresponding entry in categories sharing the same status.
SQL: | SELECT salary FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "categories",
"outer_alias": "agov",
"inner_alias": "egiv",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_09134 | train |
v3 | Schema:
customers (alias: lex)(code, salary, id, status)
projects(code, name, amount, type)
Task: Retrieve value from customers with value above the MIN(value) of projects rows sharing the same type.
SQL: | SELECT value FROM customers AS lex
WHERE value > (
SELECT MIN(value) FROM projects AS uliv
WHERE uliv.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "projects",
"outer_alias": "lex",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09135 | train |
v1 | Schema:
schedules (alias: vmob)(name, amount, salary, status)
categories(date, id, salary, value)
Task: Retrieve code from schedules whose status is found in categories rows where type matches the outer record.
SQL: | SELECT code FROM schedules AS vmob
WHERE status IN (
SELECT status FROM categories AS egiv
WHERE egiv.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "categories",
"outer_alias": "vmob",
"inner_alias": "egiv",
"proj_col": "code",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_09136 | train |
v1 | Schema:
staff (alias: xnob)(id, date, salary, type)
invoices(level, value, amount, status)
Task: Find code from staff where level appears in invoices entries with matching type.
SQL: | SELECT code FROM staff AS xnob
WHERE level IN (
SELECT level FROM invoices AS fal
WHERE fal.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "invoices",
"outer_alias": "xnob",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_09137 | train |
v2 | Schema:
staff (alias: xnob)(code, value, type, name)
invoices(code, salary, name, date)
Task: Find value from staff where a matching record exists in invoices with the same id.
SQL: | SELECT value FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "invoices",
"outer_alias": "xnob",
"inner_alias": "fal",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_09138 | train |
v3 | Schema:
schedules (alias: vmob)(status, amount, id, code)
sales(value, name, level, id)
Task: Find name from schedules where value exceeds the minimum value from sales for the same id.
SQL: | SELECT name FROM schedules AS vmob
WHERE value > (
SELECT MIN(value) FROM sales AS cif
WHERE cif.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "sales",
"outer_alias": "vmob",
"inner_alias": "cif",
"proj_col": "name",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_09139 | train |
v1 | Schema:
shipments (alias: vnob)(status, id, type, name)
branches(type, value, code, name)
Task: Find id from shipments where status appears in branches entries with matching type.
SQL: | SELECT id FROM shipments AS vnob
WHERE status IN (
SELECT status FROM branches AS agov
WHERE agov.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "branches",
"outer_alias": "vnob",
"inner_alias": "agov",
"proj_col": "id",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_09140 | train |
v3 | Schema:
sales (alias: cif)(code, amount, level, date)
shipments(type, code, status, name)
Task: Retrieve code from sales with amount above the MAX(amount) of shipments rows sharing the same status.
SQL: | SELECT code FROM sales AS cif
WHERE amount > (
SELECT MAX(amount) FROM shipments AS vnob
WHERE vnob.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "shipments",
"outer_alias": "cif",
"inner_alias": "vnob",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09141 | train |
v1 | Schema:
invoices (alias: fal)(type, date, salary, status)
shipments(value, name, status, id)
Task: Find salary from invoices where status appears in shipments entries with matching level.
SQL: | SELECT salary FROM invoices AS fal
WHERE status IN (
SELECT status FROM shipments AS vnob
WHERE vnob.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "shipments",
"outer_alias": "fal",
"inner_alias": "vnob",
"proj_col": "salary",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09142 | train |
v1 | Schema:
shipments (alias: vnob)(type, date, name, level)
regions(date, name, type, code)
Task: Retrieve name from shipments whose id is found in regions rows where id matches the outer record.
SQL: | SELECT name FROM shipments AS vnob
WHERE id IN (
SELECT id FROM regions AS okiv
WHERE okiv.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "regions",
"outer_alias": "vnob",
"inner_alias": "okiv",
"proj_col": "name",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_09143 | train |
v2 | Schema:
products (alias: nad)(salary, date, name, level)
schedules(amount, name, date, code)
Task: Retrieve code from products that have at least one corresponding entry in schedules sharing the same status.
SQL: | SELECT code FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.status = nad.status
); | {
"outer_table": "products",
"inner_table": "schedules",
"outer_alias": "nad",
"inner_alias": "vmob",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09144 | train |
v2 | Schema:
branches (alias: agov)(name, date, salary, code)
accounts(date, code, id, level)
Task: Retrieve name from branches that have at least one corresponding entry in accounts sharing the same level.
SQL: | SELECT name FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "accounts",
"outer_alias": "agov",
"inner_alias": "jac",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_09145 | train |
v2 | Schema:
branches (alias: agov)(code, salary, type, amount)
accounts(amount, name, level, value)
Task: Retrieve amount from branches that have at least one corresponding entry in accounts sharing the same type.
SQL: | SELECT amount FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "accounts",
"outer_alias": "agov",
"inner_alias": "jac",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_09146 | train |
v3 | Schema:
managers (alias: hac)(id, salary, status, amount)
regions(level, amount, value, name)
Task: Find id from managers where amount exceeds the minimum amount from regions for the same type.
SQL: | SELECT id FROM managers AS hac
WHERE amount > (
SELECT MIN(amount) FROM regions AS okiv
WHERE okiv.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "regions",
"outer_alias": "hac",
"inner_alias": "okiv",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09147 | train |
v3 | Schema:
staff (alias: xnob)(code, salary, status, type)
shipments(value, code, date, type)
Task: Find value from staff where salary exceeds the count of salary from shipments for the same id.
SQL: | SELECT value FROM staff AS xnob
WHERE salary > (
SELECT COUNT(salary) FROM shipments AS vnob
WHERE vnob.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "shipments",
"outer_alias": "xnob",
"inner_alias": "vnob",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_09148 | train |
v2 | Schema:
items (alias: ikob)(date, amount, value, status)
orders(date, id, level, code)
Task: Retrieve id from items that have at least one corresponding entry in orders sharing the same type.
SQL: | SELECT id FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "orders",
"outer_alias": "ikob",
"inner_alias": "kab",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_09149 | train |
v3 | Schema:
tasks (alias: znob)(amount, salary, name, date)
schedules(id, date, code, name)
Task: Retrieve value from tasks with amount above the MAX(amount) of schedules rows sharing the same status.
SQL: | SELECT value FROM tasks AS znob
WHERE amount > (
SELECT MAX(amount) FROM schedules AS vmob
WHERE vmob.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "schedules",
"outer_alias": "znob",
"inner_alias": "vmob",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_09150 | train |
v2 | Schema:
accounts (alias: jac)(date, salary, value, code)
categories(salary, code, date, type)
Task: Retrieve value from accounts that have at least one corresponding entry in categories sharing the same type.
SQL: | SELECT value FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "categories",
"outer_alias": "jac",
"inner_alias": "egiv",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09151 | train |
v3 | Schema:
schedules (alias: vmob)(date, value, name, code)
tasks(amount, salary, name, id)
Task: Retrieve salary from schedules with amount above the MIN(amount) of tasks rows sharing the same type.
SQL: | SELECT salary FROM schedules AS vmob
WHERE amount > (
SELECT MIN(amount) FROM tasks AS znob
WHERE znob.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "tasks",
"outer_alias": "vmob",
"inner_alias": "znob",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_09152 | train |
v1 | Schema:
requests (alias: ejof)(date, amount, status, type)
departments(type, amount, name, salary)
Task: Find code from requests where level appears in departments entries with matching status.
SQL: | SELECT code FROM requests AS ejof
WHERE level IN (
SELECT level FROM departments AS dov
WHERE dov.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "departments",
"outer_alias": "ejof",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_09153 | train |
v3 | Schema:
invoices (alias: fal)(code, amount, status, salary)
sales(value, id, amount, salary)
Task: Retrieve id from invoices with salary above the COUNT(amount) of sales rows sharing the same status.
SQL: | SELECT id FROM invoices AS fal
WHERE salary > (
SELECT COUNT(amount) FROM sales AS cif
WHERE cif.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "sales",
"outer_alias": "fal",
"inner_alias": "cif",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09154 | train |
v1 | Schema:
orders (alias: kab)(id, status, name, code)
transactions(value, id, level, name)
Task: Find id from orders where id appears in transactions entries with matching level.
SQL: | SELECT id FROM orders AS kab
WHERE id IN (
SELECT id FROM transactions AS gev
WHERE gev.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "transactions",
"outer_alias": "kab",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09155 | train |
v3 | Schema:
projects (alias: uliv)(id, status, name, amount)
invoices(name, code, status, amount)
Task: Find id from projects where value exceeds the total amount from invoices for the same status.
SQL: | SELECT id FROM projects AS uliv
WHERE value > (
SELECT SUM(amount) FROM invoices AS fal
WHERE fal.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "invoices",
"outer_alias": "uliv",
"inner_alias": "fal",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_09156 | train |
v1 | Schema:
schedules (alias: vmob)(value, status, code, salary)
staff(amount, code, name, id)
Task: Retrieve code from schedules whose status is found in staff rows where status matches the outer record.
SQL: | SELECT code FROM schedules AS vmob
WHERE status IN (
SELECT status FROM staff AS xnob
WHERE xnob.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "staff",
"outer_alias": "vmob",
"inner_alias": "xnob",
"proj_col": "code",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_09157 | train |
v1 | Schema:
tasks (alias: znob)(value, status, level, date)
sales(name, amount, level, id)
Task: Select value from tasks where code exists in sales for the same status.
SQL: | SELECT value FROM tasks AS znob
WHERE code IN (
SELECT code FROM sales AS cif
WHERE cif.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "sales",
"outer_alias": "znob",
"inner_alias": "cif",
"proj_col": "value",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_09158 | train |
v1 | Schema:
schedules (alias: vmob)(type, name, date, status)
transactions(code, name, status, amount)
Task: Find id from schedules where code appears in transactions entries with matching status.
SQL: | SELECT id FROM schedules AS vmob
WHERE code IN (
SELECT code FROM transactions AS gev
WHERE gev.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "transactions",
"outer_alias": "vmob",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_09159 | train |
v3 | Schema:
employees (alias: bev)(salary, amount, name, level)
departments(status, id, name, type)
Task: Find amount from employees where salary exceeds the minimum amount from departments for the same code.
SQL: | SELECT amount FROM employees AS bev
WHERE salary > (
SELECT MIN(amount) FROM departments AS dov
WHERE dov.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "departments",
"outer_alias": "bev",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09160 | train |
v3 | Schema:
employees (alias: bev)(level, id, value, code)
managers(type, level, name, status)
Task: Retrieve code from employees with amount above the MAX(salary) of managers rows sharing the same level.
SQL: | SELECT code FROM employees AS bev
WHERE amount > (
SELECT MAX(salary) FROM managers AS hac
WHERE hac.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "managers",
"outer_alias": "bev",
"inner_alias": "hac",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09161 | train |
v3 | Schema:
sales (alias: cif)(date, salary, value, id)
categories(type, amount, id, date)
Task: Find name from sales where amount exceeds the maximum salary from categories for the same id.
SQL: | SELECT name FROM sales AS cif
WHERE amount > (
SELECT MAX(salary) FROM categories AS egiv
WHERE egiv.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "categories",
"outer_alias": "cif",
"inner_alias": "egiv",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09162 | train |
v1 | Schema:
sales (alias: cif)(type, level, salary, code)
invoices(type, id, value, name)
Task: Retrieve name from sales whose id is found in invoices rows where code matches the outer record.
SQL: | SELECT name FROM sales AS cif
WHERE id IN (
SELECT id FROM invoices AS fal
WHERE fal.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "invoices",
"outer_alias": "cif",
"inner_alias": "fal",
"proj_col": "name",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09163 | train |
v2 | Schema:
orders (alias: kab)(type, code, amount, value)
requests(code, salary, status, amount)
Task: Retrieve id from orders that have at least one corresponding entry in requests sharing the same code.
SQL: | SELECT id FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "requests",
"outer_alias": "kab",
"inner_alias": "ejof",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09164 | train |
v2 | Schema:
shipments (alias: vnob)(value, id, amount, date)
accounts(level, name, date, salary)
Task: Retrieve code from shipments that have at least one corresponding entry in accounts sharing the same level.
SQL: | SELECT code FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "accounts",
"outer_alias": "vnob",
"inner_alias": "jac",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_09165 | train |
v3 | Schema:
employees (alias: bev)(name, amount, salary, id)
departments(amount, salary, status, name)
Task: Find code from employees where value exceeds the count of value from departments for the same status.
SQL: | SELECT code FROM employees AS bev
WHERE value > (
SELECT COUNT(value) FROM departments AS dov
WHERE dov.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "departments",
"outer_alias": "bev",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09166 | train |
v1 | Schema:
categories (alias: egiv)(status, salary, date, code)
managers(code, name, id, status)
Task: Select value from categories where type exists in managers for the same id.
SQL: | SELECT value FROM categories AS egiv
WHERE type IN (
SELECT type FROM managers AS hac
WHERE hac.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "managers",
"outer_alias": "egiv",
"inner_alias": "hac",
"proj_col": "value",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_09167 | train |
v1 | Schema:
items (alias: ikob)(status, code, name, id)
requests(salary, id, value, name)
Task: Select id from items where level exists in requests for the same code.
SQL: | SELECT id FROM items AS ikob
WHERE level IN (
SELECT level FROM requests AS ejof
WHERE ejof.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "requests",
"outer_alias": "ikob",
"inner_alias": "ejof",
"proj_col": "id",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_09168 | train |
v1 | Schema:
requests (alias: ejof)(amount, value, code, level)
transactions(name, salary, amount, value)
Task: Retrieve amount from requests whose status is found in transactions rows where id matches the outer record.
SQL: | SELECT amount FROM requests AS ejof
WHERE status IN (
SELECT status FROM transactions AS gev
WHERE gev.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "transactions",
"outer_alias": "ejof",
"inner_alias": "gev",
"proj_col": "amount",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_09169 | train |
v1 | Schema:
schedules (alias: vmob)(value, name, id, code)
tasks(salary, level, type, name)
Task: Retrieve code from schedules whose code is found in tasks rows where id matches the outer record.
SQL: | SELECT code FROM schedules AS vmob
WHERE code IN (
SELECT code FROM tasks AS znob
WHERE znob.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "tasks",
"outer_alias": "vmob",
"inner_alias": "znob",
"proj_col": "code",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_09170 | train |
v3 | Schema:
requests (alias: ejof)(type, name, value, amount)
tasks(status, date, salary, value)
Task: Find code from requests where amount exceeds the maximum amount from tasks for the same id.
SQL: | SELECT code FROM requests AS ejof
WHERE amount > (
SELECT MAX(amount) FROM tasks AS znob
WHERE znob.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "tasks",
"outer_alias": "ejof",
"inner_alias": "znob",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_09171 | train |
v2 | Schema:
accounts (alias: jac)(amount, type, date, status)
regions(level, amount, status, date)
Task: Find name from accounts where a matching record exists in regions with the same type.
SQL: | SELECT name FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "regions",
"outer_alias": "jac",
"inner_alias": "okiv",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09172 | train |
v2 | Schema:
employees (alias: bev)(code, date, salary, status)
sales(type, code, status, level)
Task: Retrieve salary from employees that have at least one corresponding entry in sales sharing the same type.
SQL: | SELECT salary FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "sales",
"outer_alias": "bev",
"inner_alias": "cif",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09173 | train |
v1 | Schema:
branches (alias: agov)(level, salary, value, code)
sales(date, code, value, name)
Task: Select value from branches where code exists in sales for the same code.
SQL: | SELECT value FROM branches AS agov
WHERE code IN (
SELECT code FROM sales AS cif
WHERE cif.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "sales",
"outer_alias": "agov",
"inner_alias": "cif",
"proj_col": "value",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_09174 | train |
v2 | Schema:
sales (alias: cif)(name, value, code, type)
departments(id, amount, value, date)
Task: Find amount from sales where a matching record exists in departments with the same status.
SQL: | SELECT amount FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "departments",
"outer_alias": "cif",
"inner_alias": "dov",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09175 | train |
v1 | Schema:
departments (alias: dov)(code, type, id, amount)
staff(level, salary, id, value)
Task: Select name from departments where id exists in staff for the same type.
SQL: | SELECT name FROM departments AS dov
WHERE id IN (
SELECT id FROM staff AS xnob
WHERE xnob.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "staff",
"outer_alias": "dov",
"inner_alias": "xnob",
"proj_col": "name",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09176 | train |
v3 | Schema:
tasks (alias: znob)(value, amount, date, status)
items(code, level, name, date)
Task: Retrieve amount from tasks with amount above the COUNT(value) of items rows sharing the same level.
SQL: | SELECT amount FROM tasks AS znob
WHERE amount > (
SELECT COUNT(value) FROM items AS ikob
WHERE ikob.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "items",
"outer_alias": "znob",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_09177 | train |
v2 | Schema:
projects (alias: uliv)(salary, level, status, amount)
sales(value, id, code, level)
Task: Find value from projects where a matching record exists in sales with the same code.
SQL: | SELECT value FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "sales",
"outer_alias": "uliv",
"inner_alias": "cif",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_09178 | train |
v2 | Schema:
orders (alias: kab)(date, status, value, amount)
staff(code, value, type, date)
Task: Retrieve amount from orders that have at least one corresponding entry in staff sharing the same id.
SQL: | SELECT amount FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "staff",
"outer_alias": "kab",
"inner_alias": "xnob",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09179 | train |
v3 | Schema:
categories (alias: egiv)(code, level, date, name)
accounts(level, name, type, salary)
Task: Find name from categories where salary exceeds the count of value from accounts for the same id.
SQL: | SELECT name FROM categories AS egiv
WHERE salary > (
SELECT COUNT(value) FROM accounts AS jac
WHERE jac.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "accounts",
"outer_alias": "egiv",
"inner_alias": "jac",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_09180 | train |
v1 | Schema:
requests (alias: ejof)(name, value, status, id)
accounts(date, name, amount, code)
Task: Select salary from requests where code exists in accounts for the same type.
SQL: | SELECT salary FROM requests AS ejof
WHERE code IN (
SELECT code FROM accounts AS jac
WHERE jac.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "accounts",
"outer_alias": "ejof",
"inner_alias": "jac",
"proj_col": "salary",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_09181 | train |
v3 | Schema:
regions (alias: okiv)(level, value, type, status)
projects(type, code, date, value)
Task: Find id from regions where amount exceeds the maximum amount from projects for the same type.
SQL: | SELECT id FROM regions AS okiv
WHERE amount > (
SELECT MAX(amount) FROM projects AS uliv
WHERE uliv.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "projects",
"outer_alias": "okiv",
"inner_alias": "uliv",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_09182 | train |
v1 | Schema:
items (alias: ikob)(level, type, status, salary)
schedules(status, level, salary, name)
Task: Retrieve amount from items whose status is found in schedules rows where code matches the outer record.
SQL: | SELECT amount FROM items AS ikob
WHERE status IN (
SELECT status FROM schedules AS vmob
WHERE vmob.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "schedules",
"outer_alias": "ikob",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_09183 | train |
v3 | Schema:
regions (alias: okiv)(date, value, status, name)
orders(salary, value, level, amount)
Task: Retrieve amount from regions with salary above the MAX(amount) of orders rows sharing the same id.
SQL: | SELECT amount FROM regions AS okiv
WHERE salary > (
SELECT MAX(amount) FROM orders AS kab
WHERE kab.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "orders",
"outer_alias": "okiv",
"inner_alias": "kab",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_09184 | train |
v3 | Schema:
managers (alias: hac)(code, type, date, status)
accounts(name, id, date, code)
Task: Find amount from managers where value exceeds the minimum salary from accounts for the same id.
SQL: | SELECT amount FROM managers AS hac
WHERE value > (
SELECT MIN(salary) FROM accounts AS jac
WHERE jac.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "accounts",
"outer_alias": "hac",
"inner_alias": "jac",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09185 | train |
v1 | Schema:
transactions (alias: gev)(name, type, date, amount)
accounts(value, type, code, name)
Task: Retrieve value from transactions whose type is found in accounts rows where status matches the outer record.
SQL: | SELECT value FROM transactions AS gev
WHERE type IN (
SELECT type FROM accounts AS jac
WHERE jac.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "accounts",
"outer_alias": "gev",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09186 | train |
v1 | Schema:
customers (alias: lex)(level, code, salary, name)
categories(id, date, status, type)
Task: Find amount from customers where type appears in categories entries with matching status.
SQL: | SELECT amount FROM customers AS lex
WHERE type IN (
SELECT type FROM categories AS egiv
WHERE egiv.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "categories",
"outer_alias": "lex",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09187 | train |
v1 | Schema:
categories (alias: egiv)(status, code, value, id)
regions(salary, amount, type, date)
Task: Retrieve id from categories whose type is found in regions rows where level matches the outer record.
SQL: | SELECT id FROM categories AS egiv
WHERE type IN (
SELECT type FROM regions AS okiv
WHERE okiv.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "regions",
"outer_alias": "egiv",
"inner_alias": "okiv",
"proj_col": "id",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_09188 | train |
v1 | Schema:
tasks (alias: znob)(status, code, type, amount)
employees(name, id, value, status)
Task: Select value from tasks where level exists in employees for the same id.
SQL: | SELECT value FROM tasks AS znob
WHERE level IN (
SELECT level FROM employees AS bev
WHERE bev.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "employees",
"outer_alias": "znob",
"inner_alias": "bev",
"proj_col": "value",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_09189 | train |
v1 | Schema:
transactions (alias: gev)(status, id, amount, date)
departments(date, id, type, amount)
Task: Retrieve id from transactions whose status is found in departments rows where status matches the outer record.
SQL: | SELECT id FROM transactions AS gev
WHERE status IN (
SELECT status FROM departments AS dov
WHERE dov.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "departments",
"outer_alias": "gev",
"inner_alias": "dov",
"proj_col": "id",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09190 | train |
v1 | Schema:
items (alias: ikob)(name, value, code, amount)
orders(level, date, name, amount)
Task: Retrieve code from items whose code is found in orders rows where type matches the outer record.
SQL: | SELECT code FROM items AS ikob
WHERE code IN (
SELECT code FROM orders AS kab
WHERE kab.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "orders",
"outer_alias": "ikob",
"inner_alias": "kab",
"proj_col": "code",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_09191 | train |
v2 | Schema:
employees (alias: bev)(salary, id, level, type)
requests(amount, id, date, type)
Task: Retrieve code from employees that have at least one corresponding entry in requests sharing the same status.
SQL: | SELECT code FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "requests",
"outer_alias": "bev",
"inner_alias": "ejof",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09192 | train |
v3 | Schema:
products (alias: nad)(level, amount, name, status)
customers(date, type, name, salary)
Task: Find code from products where value exceeds the average salary from customers for the same type.
SQL: | SELECT code FROM products AS nad
WHERE value > (
SELECT AVG(salary) FROM customers AS lex
WHERE lex.type = nad.type
); | {
"outer_table": "products",
"inner_table": "customers",
"outer_alias": "nad",
"inner_alias": "lex",
"proj_col": "code",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09193 | train |
v3 | Schema:
regions (alias: okiv)(status, value, code, date)
categories(type, level, code, amount)
Task: Retrieve value from regions with salary above the AVG(value) of categories rows sharing the same type.
SQL: | SELECT value FROM regions AS okiv
WHERE salary > (
SELECT AVG(value) FROM categories AS egiv
WHERE egiv.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "categories",
"outer_alias": "okiv",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_09194 | train |
v2 | Schema:
schedules (alias: vmob)(id, type, date, code)
tasks(name, salary, status, id)
Task: Retrieve amount from schedules that have at least one corresponding entry in tasks sharing the same type.
SQL: | SELECT amount FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "tasks",
"outer_alias": "vmob",
"inner_alias": "znob",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_09195 | train |
v1 | Schema:
staff (alias: xnob)(level, value, salary, id)
accounts(type, level, id, amount)
Task: Retrieve salary from staff whose id is found in accounts rows where id matches the outer record.
SQL: | SELECT salary FROM staff AS xnob
WHERE id IN (
SELECT id FROM accounts AS jac
WHERE jac.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "accounts",
"outer_alias": "xnob",
"inner_alias": "jac",
"proj_col": "salary",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_09196 | train |
v2 | Schema:
regions (alias: okiv)(name, id, date, status)
employees(amount, id, status, date)
Task: Retrieve code from regions that have at least one corresponding entry in employees sharing the same code.
SQL: | SELECT code FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "employees",
"outer_alias": "okiv",
"inner_alias": "bev",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_09197 | train |
v1 | Schema:
managers (alias: hac)(name, level, salary, amount)
sales(salary, code, amount, value)
Task: Find value from managers where status appears in sales entries with matching type.
SQL: | SELECT value FROM managers AS hac
WHERE status IN (
SELECT status FROM sales AS cif
WHERE cif.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "sales",
"outer_alias": "hac",
"inner_alias": "cif",
"proj_col": "value",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09198 | train |
v3 | Schema:
tasks (alias: znob)(value, type, date, amount)
requests(type, status, code, salary)
Task: Find value from tasks where value exceeds the average salary from requests for the same status.
SQL: | SELECT value FROM tasks AS znob
WHERE value > (
SELECT AVG(salary) FROM requests AS ejof
WHERE ejof.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "requests",
"outer_alias": "znob",
"inner_alias": "ejof",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_09199 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.