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 |
|---|---|---|---|---|---|---|
v3 | Schema:
accounts (alias: jac)(salary, amount, type, value)
schedules(status, level, amount, id)
Task: Retrieve value from accounts with salary above the AVG(salary) of schedules rows sharing the same level.
SQL: | SELECT value FROM accounts AS jac
WHERE salary > (
SELECT AVG(salary) FROM schedules AS vmob
WHERE vmob.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "schedules",
"outer_alias": "jac",
"inner_alias": "vmob",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03900 | train |
v2 | Schema:
regions (alias: okiv)(type, amount, salary, status)
customers(type, name, level, id)
Task: Find code from regions where a matching record exists in customers with the same code.
SQL: | SELECT code FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "customers",
"outer_alias": "okiv",
"inner_alias": "lex",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03901 | train |
v2 | Schema:
staff (alias: xnob)(level, date, status, code)
invoices(name, amount, status, date)
Task: Find value from staff where a matching record exists in invoices with the same type.
SQL: | SELECT value FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "invoices",
"outer_alias": "xnob",
"inner_alias": "fal",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_03902 | train |
v2 | Schema:
staff (alias: xnob)(value, salary, date, status)
customers(amount, code, date, value)
Task: Retrieve id from staff that have at least one corresponding entry in customers sharing the same id.
SQL: | SELECT id FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "customers",
"outer_alias": "xnob",
"inner_alias": "lex",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_03903 | train |
v2 | Schema:
branches (alias: agov)(value, level, salary, date)
orders(level, date, status, amount)
Task: Find salary from branches where a matching record exists in orders with the same code.
SQL: | SELECT salary FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "orders",
"outer_alias": "agov",
"inner_alias": "kab",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_03904 | train |
v2 | Schema:
schedules (alias: vmob)(status, value, date, id)
shipments(amount, type, status, name)
Task: Retrieve salary from schedules that have at least one corresponding entry in shipments sharing the same id.
SQL: | SELECT salary FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "shipments",
"outer_alias": "vmob",
"inner_alias": "vnob",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_03905 | train |
v1 | Schema:
requests (alias: ejof)(status, date, code, value)
shipments(type, date, amount, id)
Task: Retrieve id from requests whose code is found in shipments rows where code matches the outer record.
SQL: | SELECT id FROM requests AS ejof
WHERE code IN (
SELECT code FROM shipments AS vnob
WHERE vnob.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "shipments",
"outer_alias": "ejof",
"inner_alias": "vnob",
"proj_col": "id",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_03906 | train |
v3 | Schema:
tasks (alias: znob)(status, level, id, date)
sales(salary, level, status, code)
Task: Retrieve salary from tasks with amount above the MIN(amount) of sales rows sharing the same level.
SQL: | SELECT salary FROM tasks AS znob
WHERE amount > (
SELECT MIN(amount) FROM sales AS cif
WHERE cif.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "sales",
"outer_alias": "znob",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_03907 | train |
v2 | Schema:
sales (alias: cif)(amount, id, status, value)
projects(salary, date, code, status)
Task: Find value from sales where a matching record exists in projects with the same code.
SQL: | SELECT value FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "projects",
"outer_alias": "cif",
"inner_alias": "uliv",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03908 | train |
v2 | Schema:
sales (alias: cif)(value, amount, level, code)
invoices(id, amount, salary, code)
Task: Find salary from sales where a matching record exists in invoices with the same type.
SQL: | SELECT salary FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "invoices",
"outer_alias": "cif",
"inner_alias": "fal",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03909 | train |
v2 | Schema:
schedules (alias: vmob)(type, code, salary, level)
employees(status, code, amount, date)
Task: Retrieve salary from schedules that have at least one corresponding entry in employees sharing the same status.
SQL: | SELECT salary FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "employees",
"outer_alias": "vmob",
"inner_alias": "bev",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_03910 | train |
v3 | Schema:
regions (alias: okiv)(amount, type, id, date)
staff(status, value, amount, name)
Task: Find value from regions where amount exceeds the maximum salary from staff for the same code.
SQL: | SELECT value FROM regions AS okiv
WHERE amount > (
SELECT MAX(salary) FROM staff AS xnob
WHERE xnob.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "staff",
"outer_alias": "okiv",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03911 | train |
v2 | Schema:
items (alias: ikob)(amount, type, status, value)
branches(status, amount, name, code)
Task: Find value from items where a matching record exists in branches with the same code.
SQL: | SELECT value FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "branches",
"outer_alias": "ikob",
"inner_alias": "agov",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03912 | train |
v2 | Schema:
categories (alias: egiv)(salary, type, status, level)
schedules(date, level, value, id)
Task: Retrieve salary from categories that have at least one corresponding entry in schedules sharing the same code.
SQL: | SELECT salary FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "schedules",
"outer_alias": "egiv",
"inner_alias": "vmob",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_03913 | train |
v2 | Schema:
accounts (alias: jac)(salary, type, status, code)
branches(id, level, name, value)
Task: Find amount from accounts where a matching record exists in branches with the same type.
SQL: | SELECT amount FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "branches",
"outer_alias": "jac",
"inner_alias": "agov",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03914 | train |
v1 | Schema:
shipments (alias: vnob)(level, salary, status, type)
departments(salary, level, code, amount)
Task: Retrieve name from shipments whose id is found in departments rows where level matches the outer record.
SQL: | SELECT name FROM shipments AS vnob
WHERE id IN (
SELECT id FROM departments AS dov
WHERE dov.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "departments",
"outer_alias": "vnob",
"inner_alias": "dov",
"proj_col": "name",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03915 | train |
v2 | Schema:
requests (alias: ejof)(level, date, amount, name)
sales(id, date, value, type)
Task: Retrieve name from requests that have at least one corresponding entry in sales sharing the same status.
SQL: | SELECT name FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "sales",
"outer_alias": "ejof",
"inner_alias": "cif",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_03916 | train |
v3 | Schema:
shipments (alias: vnob)(salary, amount, level, date)
schedules(name, type, value, amount)
Task: Find salary from shipments where value exceeds the total value from schedules for the same type.
SQL: | SELECT salary FROM shipments AS vnob
WHERE value > (
SELECT SUM(value) FROM schedules AS vmob
WHERE vmob.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "schedules",
"outer_alias": "vnob",
"inner_alias": "vmob",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03917 | train |
v2 | Schema:
sales (alias: cif)(amount, name, level, status)
requests(id, value, status, amount)
Task: Find name from sales where a matching record exists in requests with the same status.
SQL: | SELECT name FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "requests",
"outer_alias": "cif",
"inner_alias": "ejof",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03918 | train |
v1 | Schema:
staff (alias: xnob)(level, salary, code, status)
departments(date, value, name, level)
Task: Select amount from staff where type exists in departments for the same type.
SQL: | SELECT amount FROM staff AS xnob
WHERE type IN (
SELECT type FROM departments AS dov
WHERE dov.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "departments",
"outer_alias": "xnob",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_03919 | train |
v1 | Schema:
transactions (alias: gev)(status, type, id, amount)
sales(type, status, value, level)
Task: Retrieve amount from transactions whose status is found in sales rows where type matches the outer record.
SQL: | SELECT amount FROM transactions AS gev
WHERE status IN (
SELECT status FROM sales AS cif
WHERE cif.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "sales",
"outer_alias": "gev",
"inner_alias": "cif",
"proj_col": "amount",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03920 | train |
v3 | Schema:
items (alias: ikob)(type, code, level, value)
departments(level, date, value, id)
Task: Retrieve code from items with value above the MIN(amount) of departments rows sharing the same status.
SQL: | SELECT code FROM items AS ikob
WHERE value > (
SELECT MIN(amount) FROM departments AS dov
WHERE dov.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "departments",
"outer_alias": "ikob",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03921 | train |
v1 | Schema:
managers (alias: hac)(value, level, date, type)
employees(status, code, date, salary)
Task: Find code from managers where status appears in employees entries with matching status.
SQL: | SELECT code FROM managers AS hac
WHERE status IN (
SELECT status FROM employees AS bev
WHERE bev.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "employees",
"outer_alias": "hac",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03922 | train |
v3 | Schema:
sales (alias: cif)(status, amount, type, name)
tasks(status, type, code, date)
Task: Find salary from sales where value exceeds the minimum salary from tasks for the same code.
SQL: | SELECT salary FROM sales AS cif
WHERE value > (
SELECT MIN(salary) FROM tasks AS znob
WHERE znob.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "tasks",
"outer_alias": "cif",
"inner_alias": "znob",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03923 | train |
v1 | Schema:
items (alias: ikob)(level, value, salary, status)
regions(salary, name, value, id)
Task: Select amount from items where status exists in regions for the same status.
SQL: | SELECT amount FROM items AS ikob
WHERE status IN (
SELECT status FROM regions AS okiv
WHERE okiv.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "regions",
"outer_alias": "ikob",
"inner_alias": "okiv",
"proj_col": "amount",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03924 | train |
v1 | Schema:
staff (alias: xnob)(value, date, name, code)
sales(level, id, type, status)
Task: Find value from staff where type appears in sales entries with matching level.
SQL: | SELECT value FROM staff AS xnob
WHERE type IN (
SELECT type FROM sales AS cif
WHERE cif.level = xnob.level
); | {
"outer_table": "staff",
"inner_table": "sales",
"outer_alias": "xnob",
"inner_alias": "cif",
"proj_col": "value",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "xnob.level",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_03925 | train |
v2 | Schema:
categories (alias: egiv)(type, salary, id, level)
projects(date, id, name, level)
Task: Find id from categories where a matching record exists in projects with the same level.
SQL: | SELECT id FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "projects",
"outer_alias": "egiv",
"inner_alias": "uliv",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_03926 | train |
v1 | Schema:
invoices (alias: fal)(value, status, code, id)
tasks(id, type, level, salary)
Task: Retrieve value from invoices whose status is found in tasks rows where status matches the outer record.
SQL: | SELECT value FROM invoices AS fal
WHERE status IN (
SELECT status FROM tasks AS znob
WHERE znob.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "tasks",
"outer_alias": "fal",
"inner_alias": "znob",
"proj_col": "value",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03927 | train |
v3 | Schema:
customers (alias: lex)(name, date, salary, level)
requests(amount, status, name, id)
Task: Find name from customers where salary exceeds the minimum salary from requests for the same code.
SQL: | SELECT name FROM customers AS lex
WHERE salary > (
SELECT MIN(salary) FROM requests AS ejof
WHERE ejof.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "requests",
"outer_alias": "lex",
"inner_alias": "ejof",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03928 | train |
v2 | Schema:
requests (alias: ejof)(type, status, amount, date)
sales(name, amount, salary, level)
Task: Retrieve salary from requests that have at least one corresponding entry in sales sharing the same code.
SQL: | SELECT salary FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "sales",
"outer_alias": "ejof",
"inner_alias": "cif",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_03929 | train |
v1 | Schema:
employees (alias: bev)(amount, code, name, date)
products(salary, name, amount, level)
Task: Retrieve id from employees whose id is found in products rows where level matches the outer record.
SQL: | SELECT id FROM employees AS bev
WHERE id IN (
SELECT id FROM products AS nad
WHERE nad.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "products",
"outer_alias": "bev",
"inner_alias": "nad",
"proj_col": "id",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03930 | train |
v3 | Schema:
employees (alias: bev)(status, salary, type, value)
accounts(salary, level, code, value)
Task: Retrieve id from employees with value above the MAX(amount) of accounts rows sharing the same id.
SQL: | SELECT id FROM employees AS bev
WHERE value > (
SELECT MAX(amount) FROM accounts AS jac
WHERE jac.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "accounts",
"outer_alias": "bev",
"inner_alias": "jac",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03931 | train |
v1 | Schema:
managers (alias: hac)(salary, amount, id, date)
sales(status, date, name, code)
Task: Retrieve name from managers whose type is found in sales rows where code matches the outer record.
SQL: | SELECT name FROM managers AS hac
WHERE type IN (
SELECT type FROM sales AS cif
WHERE cif.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "sales",
"outer_alias": "hac",
"inner_alias": "cif",
"proj_col": "name",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03932 | train |
v1 | Schema:
customers (alias: lex)(amount, status, id, value)
regions(name, salary, amount, level)
Task: Select value from customers where code exists in regions for the same type.
SQL: | SELECT value FROM customers AS lex
WHERE code IN (
SELECT code FROM regions AS okiv
WHERE okiv.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "regions",
"outer_alias": "lex",
"inner_alias": "okiv",
"proj_col": "value",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03933 | train |
v3 | Schema:
managers (alias: hac)(value, salary, level, id)
employees(value, amount, date, name)
Task: Find id from managers where value exceeds the maximum salary from employees for the same level.
SQL: | SELECT id FROM managers AS hac
WHERE value > (
SELECT MAX(salary) FROM employees AS bev
WHERE bev.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "employees",
"outer_alias": "hac",
"inner_alias": "bev",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03934 | train |
v3 | Schema:
shipments (alias: vnob)(salary, status, level, value)
tasks(value, type, status, code)
Task: Find name from shipments where salary exceeds the maximum amount from tasks for the same id.
SQL: | SELECT name FROM shipments AS vnob
WHERE salary > (
SELECT MAX(amount) FROM tasks AS znob
WHERE znob.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "tasks",
"outer_alias": "vnob",
"inner_alias": "znob",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03935 | train |
v1 | Schema:
requests (alias: ejof)(status, salary, name, amount)
invoices(salary, type, date, level)
Task: Select code from requests where code exists in invoices for the same id.
SQL: | SELECT code FROM requests AS ejof
WHERE code IN (
SELECT code FROM invoices AS fal
WHERE fal.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "invoices",
"outer_alias": "ejof",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_03936 | train |
v1 | Schema:
staff (alias: xnob)(id, type, code, amount)
tasks(value, salary, amount, type)
Task: Select id from staff where type exists in tasks for the same type.
SQL: | SELECT id FROM staff AS xnob
WHERE type IN (
SELECT type FROM tasks AS znob
WHERE znob.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "tasks",
"outer_alias": "xnob",
"inner_alias": "znob",
"proj_col": "id",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_03937 | train |
v2 | Schema:
tasks (alias: znob)(status, date, value, salary)
departments(type, amount, name, date)
Task: Find amount from tasks where a matching record exists in departments with the same type.
SQL: | SELECT amount FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "departments",
"outer_alias": "znob",
"inner_alias": "dov",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_03938 | train |
v3 | Schema:
tasks (alias: znob)(value, level, name, id)
projects(code, type, status, salary)
Task: Retrieve salary from tasks with value above the MAX(salary) of projects rows sharing the same type.
SQL: | SELECT salary FROM tasks AS znob
WHERE value > (
SELECT MAX(salary) FROM projects AS uliv
WHERE uliv.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "projects",
"outer_alias": "znob",
"inner_alias": "uliv",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_03939 | train |
v2 | Schema:
staff (alias: xnob)(salary, level, value, type)
schedules(type, value, level, salary)
Task: Find amount from staff where a matching record exists in schedules with the same id.
SQL: | SELECT amount FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "schedules",
"outer_alias": "xnob",
"inner_alias": "vmob",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_03940 | train |
v2 | Schema:
items (alias: ikob)(name, type, date, salary)
tasks(name, type, date, amount)
Task: Find value from items where a matching record exists in tasks with the same status.
SQL: | SELECT value FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "tasks",
"outer_alias": "ikob",
"inner_alias": "znob",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03941 | train |
v3 | Schema:
sales (alias: cif)(type, code, id, value)
staff(code, status, amount, salary)
Task: Retrieve salary from sales with value above the COUNT(amount) of staff rows sharing the same code.
SQL: | SELECT salary FROM sales AS cif
WHERE value > (
SELECT COUNT(amount) FROM staff AS xnob
WHERE xnob.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "staff",
"outer_alias": "cif",
"inner_alias": "xnob",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03942 | train |
v3 | Schema:
tasks (alias: znob)(date, amount, value, type)
sales(salary, value, id, amount)
Task: Find salary from tasks where value exceeds the average amount from sales for the same code.
SQL: | SELECT salary FROM tasks AS znob
WHERE value > (
SELECT AVG(amount) FROM sales AS cif
WHERE cif.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "sales",
"outer_alias": "znob",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_03943 | train |
v1 | Schema:
transactions (alias: gev)(name, status, salary, amount)
schedules(value, date, salary, name)
Task: Find value from transactions where id appears in schedules entries with matching code.
SQL: | SELECT value FROM transactions AS gev
WHERE id IN (
SELECT id FROM schedules AS vmob
WHERE vmob.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "schedules",
"outer_alias": "gev",
"inner_alias": "vmob",
"proj_col": "value",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03944 | train |
v3 | Schema:
requests (alias: ejof)(value, status, date, name)
branches(value, status, id, amount)
Task: Retrieve id from requests with salary above the AVG(amount) of branches rows sharing the same status.
SQL: | SELECT id FROM requests AS ejof
WHERE salary > (
SELECT AVG(amount) FROM branches AS agov
WHERE agov.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "branches",
"outer_alias": "ejof",
"inner_alias": "agov",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_03945 | train |
v3 | Schema:
tasks (alias: znob)(amount, id, code, value)
managers(value, name, salary, date)
Task: Find amount from tasks where value exceeds the total salary from managers for the same code.
SQL: | SELECT amount FROM tasks AS znob
WHERE value > (
SELECT SUM(salary) FROM managers AS hac
WHERE hac.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "managers",
"outer_alias": "znob",
"inner_alias": "hac",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_03946 | train |
v3 | Schema:
sales (alias: cif)(code, value, status, salary)
employees(amount, value, status, type)
Task: Find name from sales where amount exceeds the total salary from employees for the same level.
SQL: | SELECT name FROM sales AS cif
WHERE amount > (
SELECT SUM(salary) FROM employees AS bev
WHERE bev.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "employees",
"outer_alias": "cif",
"inner_alias": "bev",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03947 | train |
v1 | Schema:
accounts (alias: jac)(status, level, salary, code)
transactions(code, id, amount, level)
Task: Retrieve id from accounts whose level is found in transactions rows where level matches the outer record.
SQL: | SELECT id FROM accounts AS jac
WHERE level IN (
SELECT level FROM transactions AS gev
WHERE gev.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "transactions",
"outer_alias": "jac",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03948 | train |
v2 | Schema:
orders (alias: kab)(status, level, type, salary)
transactions(name, id, salary, amount)
Task: Find name from orders where a matching record exists in transactions with the same type.
SQL: | SELECT name 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": "name",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03949 | train |
v3 | Schema:
managers (alias: hac)(salary, id, name, type)
transactions(level, type, date, status)
Task: Find salary from managers where salary exceeds the total amount from transactions for the same status.
SQL: | SELECT salary FROM managers AS hac
WHERE salary > (
SELECT SUM(amount) FROM transactions AS gev
WHERE gev.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "transactions",
"outer_alias": "hac",
"inner_alias": "gev",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03950 | train |
v2 | Schema:
customers (alias: lex)(salary, id, value, code)
regions(value, salary, type, date)
Task: Find id from customers where a matching record exists in regions with the same code.
SQL: | SELECT id FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "regions",
"outer_alias": "lex",
"inner_alias": "okiv",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03951 | train |
v1 | Schema:
schedules (alias: vmob)(code, status, id, name)
shipments(id, date, type, name)
Task: Select name from schedules where code exists in shipments for the same level.
SQL: | SELECT name FROM schedules AS vmob
WHERE code IN (
SELECT code FROM shipments AS vnob
WHERE vnob.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "shipments",
"outer_alias": "vmob",
"inner_alias": "vnob",
"proj_col": "name",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_03952 | train |
v1 | Schema:
sales (alias: cif)(date, salary, level, type)
customers(level, id, type, amount)
Task: Find name from sales where id appears in customers entries with matching level.
SQL: | SELECT name FROM sales AS cif
WHERE id IN (
SELECT id FROM customers AS lex
WHERE lex.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "customers",
"outer_alias": "cif",
"inner_alias": "lex",
"proj_col": "name",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03953 | train |
v2 | Schema:
categories (alias: egiv)(code, type, amount, name)
products(salary, value, id, type)
Task: Find amount from categories where a matching record exists in products with the same level.
SQL: | SELECT amount FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "products",
"outer_alias": "egiv",
"inner_alias": "nad",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_03954 | train |
v1 | Schema:
orders (alias: kab)(amount, code, level, status)
tasks(type, value, level, salary)
Task: Select amount from orders where code exists in tasks for the same id.
SQL: | SELECT amount FROM orders AS kab
WHERE code IN (
SELECT code FROM tasks AS znob
WHERE znob.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "tasks",
"outer_alias": "kab",
"inner_alias": "znob",
"proj_col": "amount",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03955 | train |
v3 | Schema:
employees (alias: bev)(value, amount, level, name)
staff(amount, code, level, status)
Task: Find id from employees where salary exceeds the count of amount from staff for the same id.
SQL: | SELECT id FROM employees AS bev
WHERE salary > (
SELECT COUNT(amount) FROM staff AS xnob
WHERE xnob.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "staff",
"outer_alias": "bev",
"inner_alias": "xnob",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03956 | train |
v1 | Schema:
items (alias: ikob)(name, value, code, type)
staff(date, id, type, name)
Task: Select name from items where type exists in staff for the same code.
SQL: | SELECT name FROM items AS ikob
WHERE type IN (
SELECT type FROM staff AS xnob
WHERE xnob.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "staff",
"outer_alias": "ikob",
"inner_alias": "xnob",
"proj_col": "name",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03957 | train |
v2 | Schema:
transactions (alias: gev)(code, status, amount, salary)
orders(level, amount, code, date)
Task: Find name from transactions where a matching record exists in orders with the same code.
SQL: | SELECT name FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "orders",
"outer_alias": "gev",
"inner_alias": "kab",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03958 | train |
v1 | Schema:
branches (alias: agov)(level, name, value, salary)
categories(code, salary, status, amount)
Task: Find amount from branches where status appears in categories entries with matching level.
SQL: | SELECT amount FROM branches AS agov
WHERE status IN (
SELECT status FROM categories AS egiv
WHERE egiv.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "categories",
"outer_alias": "agov",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_03959 | train |
v1 | Schema:
staff (alias: xnob)(value, date, amount, status)
categories(type, salary, value, id)
Task: Find amount from staff where type appears in categories entries with matching code.
SQL: | SELECT amount FROM staff AS xnob
WHERE type IN (
SELECT type FROM categories AS egiv
WHERE egiv.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "categories",
"outer_alias": "xnob",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_03960 | train |
v3 | Schema:
projects (alias: uliv)(name, type, status, id)
managers(id, name, type, code)
Task: Retrieve id from projects with salary above the MAX(value) of managers rows sharing the same code.
SQL: | SELECT id FROM projects AS uliv
WHERE salary > (
SELECT MAX(value) FROM managers AS hac
WHERE hac.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "managers",
"outer_alias": "uliv",
"inner_alias": "hac",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_03961 | train |
v1 | Schema:
departments (alias: dov)(code, name, amount, date)
schedules(level, type, code, salary)
Task: Find id from departments where id appears in schedules entries with matching level.
SQL: | SELECT id FROM departments AS dov
WHERE id IN (
SELECT id FROM schedules AS vmob
WHERE vmob.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "schedules",
"outer_alias": "dov",
"inner_alias": "vmob",
"proj_col": "id",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03962 | train |
v1 | Schema:
sales (alias: cif)(name, date, type, salary)
departments(value, level, amount, salary)
Task: Select id from sales where id exists in departments for the same level.
SQL: | SELECT id FROM sales AS cif
WHERE id IN (
SELECT id FROM departments AS dov
WHERE dov.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "departments",
"outer_alias": "cif",
"inner_alias": "dov",
"proj_col": "id",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03963 | train |
v1 | Schema:
transactions (alias: gev)(date, value, amount, status)
branches(type, amount, status, id)
Task: Retrieve name from transactions whose level is found in branches rows where code matches the outer record.
SQL: | SELECT name FROM transactions AS gev
WHERE level IN (
SELECT level FROM branches AS agov
WHERE agov.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "branches",
"outer_alias": "gev",
"inner_alias": "agov",
"proj_col": "name",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03964 | train |
v3 | Schema:
tasks (alias: znob)(type, id, name, level)
employees(id, salary, status, name)
Task: Find code from tasks where salary exceeds the total value from employees for the same id.
SQL: | SELECT code FROM tasks AS znob
WHERE salary > (
SELECT SUM(value) FROM employees AS bev
WHERE bev.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "employees",
"outer_alias": "znob",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_03965 | train |
v2 | Schema:
projects (alias: uliv)(code, name, id, level)
staff(name, amount, type, salary)
Task: Retrieve salary from projects that have at least one corresponding entry in staff sharing 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_03966 | train |
v1 | Schema:
invoices (alias: fal)(type, name, salary, id)
customers(status, name, date, level)
Task: Select name from invoices where id exists in customers for the same type.
SQL: | SELECT name FROM invoices AS fal
WHERE id IN (
SELECT id FROM customers AS lex
WHERE lex.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "customers",
"outer_alias": "fal",
"inner_alias": "lex",
"proj_col": "name",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03967 | train |
v1 | Schema:
items (alias: ikob)(code, name, status, salary)
schedules(code, status, name, amount)
Task: Retrieve name from items whose type is found in schedules rows where level matches the outer record.
SQL: | SELECT name FROM items AS ikob
WHERE type IN (
SELECT type FROM schedules AS vmob
WHERE vmob.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "schedules",
"outer_alias": "ikob",
"inner_alias": "vmob",
"proj_col": "name",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03968 | train |
v2 | Schema:
regions (alias: okiv)(code, salary, status, value)
requests(amount, code, value, level)
Task: Find salary from regions where a matching record exists in requests with the same level.
SQL: | SELECT salary FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "requests",
"outer_alias": "okiv",
"inner_alias": "ejof",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03969 | train |
v3 | Schema:
schedules (alias: vmob)(name, salary, amount, date)
branches(name, salary, status, amount)
Task: Find salary from schedules where amount exceeds the total salary from branches for the same id.
SQL: | SELECT salary FROM schedules AS vmob
WHERE amount > (
SELECT SUM(salary) FROM branches AS agov
WHERE agov.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "branches",
"outer_alias": "vmob",
"inner_alias": "agov",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_03970 | train |
v3 | Schema:
transactions (alias: gev)(status, value, level, code)
branches(date, code, level, name)
Task: Find id from transactions where salary exceeds the count of amount from branches for the same type.
SQL: | SELECT id FROM transactions AS gev
WHERE salary > (
SELECT COUNT(amount) FROM branches AS agov
WHERE agov.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "branches",
"outer_alias": "gev",
"inner_alias": "agov",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03971 | train |
v1 | Schema:
requests (alias: ejof)(salary, type, amount, date)
branches(date, name, type, level)
Task: Select value from requests where code exists in branches for the same code.
SQL: | SELECT value FROM requests AS ejof
WHERE code IN (
SELECT code FROM branches AS agov
WHERE agov.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "branches",
"outer_alias": "ejof",
"inner_alias": "agov",
"proj_col": "value",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_03972 | train |
v3 | Schema:
orders (alias: kab)(level, status, name, amount)
projects(salary, date, level, name)
Task: Retrieve name from orders with salary above the MAX(value) of projects rows sharing the same code.
SQL: | SELECT name FROM orders AS kab
WHERE salary > (
SELECT MAX(value) FROM projects AS uliv
WHERE uliv.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "projects",
"outer_alias": "kab",
"inner_alias": "uliv",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03973 | train |
v3 | Schema:
staff (alias: xnob)(name, id, amount, code)
shipments(code, name, level, status)
Task: Retrieve id from staff with amount above the AVG(salary) of shipments rows sharing the same status.
SQL: | SELECT id FROM staff AS xnob
WHERE amount > (
SELECT AVG(salary) FROM shipments AS vnob
WHERE vnob.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "shipments",
"outer_alias": "xnob",
"inner_alias": "vnob",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_03974 | train |
v3 | Schema:
regions (alias: okiv)(status, salary, value, amount)
transactions(date, level, code, name)
Task: Retrieve value from regions with amount above the COUNT(salary) of transactions rows sharing the same code.
SQL: | SELECT value FROM regions AS okiv
WHERE amount > (
SELECT COUNT(salary) FROM transactions AS gev
WHERE gev.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "transactions",
"outer_alias": "okiv",
"inner_alias": "gev",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03975 | train |
v2 | Schema:
tasks (alias: znob)(amount, value, code, salary)
customers(name, amount, status, type)
Task: Find id from tasks where a matching record exists in customers with the same id.
SQL: | SELECT id FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "customers",
"outer_alias": "znob",
"inner_alias": "lex",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_03976 | train |
v2 | Schema:
projects (alias: uliv)(amount, salary, name, value)
invoices(code, value, date, level)
Task: Retrieve salary from projects that have at least one corresponding entry in invoices sharing the same type.
SQL: | SELECT salary FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "invoices",
"outer_alias": "uliv",
"inner_alias": "fal",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_03977 | train |
v3 | Schema:
products (alias: nad)(level, code, amount, name)
shipments(value, salary, code, name)
Task: Find salary from products where amount exceeds the total value from shipments for the same status.
SQL: | SELECT salary FROM products AS nad
WHERE amount > (
SELECT SUM(value) FROM shipments AS vnob
WHERE vnob.status = nad.status
); | {
"outer_table": "products",
"inner_table": "shipments",
"outer_alias": "nad",
"inner_alias": "vnob",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03978 | train |
v1 | Schema:
sales (alias: cif)(name, id, type, salary)
managers(level, name, amount, code)
Task: Find code from sales where type appears in managers entries with matching code.
SQL: | SELECT code FROM sales AS cif
WHERE type IN (
SELECT type FROM managers AS hac
WHERE hac.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "managers",
"outer_alias": "cif",
"inner_alias": "hac",
"proj_col": "code",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03979 | train |
v3 | Schema:
regions (alias: okiv)(status, name, type, date)
products(name, type, level, date)
Task: Retrieve amount from regions with value above the AVG(salary) of products rows sharing the same id.
SQL: | SELECT amount FROM regions AS okiv
WHERE value > (
SELECT AVG(salary) FROM products AS nad
WHERE nad.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "products",
"outer_alias": "okiv",
"inner_alias": "nad",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03980 | train |
v3 | Schema:
schedules (alias: vmob)(level, id, code, value)
customers(date, code, salary, level)
Task: Retrieve code from schedules with amount above the MAX(value) of customers rows sharing the same id.
SQL: | SELECT code FROM schedules AS vmob
WHERE amount > (
SELECT MAX(value) FROM customers AS lex
WHERE lex.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "customers",
"outer_alias": "vmob",
"inner_alias": "lex",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_03981 | train |
v3 | Schema:
tasks (alias: znob)(id, amount, type, level)
transactions(amount, salary, date, id)
Task: Retrieve value from tasks with salary above the SUM(salary) of transactions rows sharing the same id.
SQL: | SELECT value FROM tasks AS znob
WHERE salary > (
SELECT SUM(salary) FROM transactions AS gev
WHERE gev.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "transactions",
"outer_alias": "znob",
"inner_alias": "gev",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_03982 | train |
v1 | Schema:
departments (alias: dov)(value, name, status, code)
items(value, id, level, amount)
Task: Retrieve code from departments whose code is found in items rows where status matches the outer record.
SQL: | SELECT code FROM departments AS dov
WHERE code IN (
SELECT code FROM items AS ikob
WHERE ikob.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "items",
"outer_alias": "dov",
"inner_alias": "ikob",
"proj_col": "code",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03983 | train |
v2 | Schema:
managers (alias: hac)(code, amount, name, salary)
sales(date, name, status, salary)
Task: Find id from managers where a matching record exists in sales with the same code.
SQL: | SELECT id FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "sales",
"outer_alias": "hac",
"inner_alias": "cif",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03984 | train |
v1 | Schema:
orders (alias: kab)(type, code, salary, level)
categories(id, code, name, date)
Task: Select name from orders where id exists in categories for the same status.
SQL: | SELECT name FROM orders AS kab
WHERE id IN (
SELECT id FROM categories AS egiv
WHERE egiv.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "categories",
"outer_alias": "kab",
"inner_alias": "egiv",
"proj_col": "name",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03985 | train |
v3 | Schema:
orders (alias: kab)(type, salary, id, amount)
departments(level, value, date, code)
Task: Retrieve name from orders with value above the COUNT(value) of departments rows sharing the same status.
SQL: | SELECT name FROM orders AS kab
WHERE value > (
SELECT COUNT(value) FROM departments AS dov
WHERE dov.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "departments",
"outer_alias": "kab",
"inner_alias": "dov",
"proj_col": "name",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03986 | train |
v2 | Schema:
regions (alias: okiv)(salary, name, level, code)
products(code, id, status, type)
Task: Retrieve salary from regions that have at least one corresponding entry in products sharing the same level.
SQL: | SELECT salary FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "products",
"outer_alias": "okiv",
"inner_alias": "nad",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03987 | train |
v3 | Schema:
schedules (alias: vmob)(level, salary, amount, value)
products(id, code, type, level)
Task: Find salary from schedules where amount exceeds the maximum salary from products for the same status.
SQL: | SELECT salary FROM schedules AS vmob
WHERE amount > (
SELECT MAX(salary) FROM products AS nad
WHERE nad.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "products",
"outer_alias": "vmob",
"inner_alias": "nad",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_03988 | train |
v2 | Schema:
invoices (alias: fal)(id, code, value, type)
managers(amount, type, value, salary)
Task: Retrieve salary from invoices that have at least one corresponding entry in managers sharing the same level.
SQL: | SELECT salary FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "managers",
"outer_alias": "fal",
"inner_alias": "hac",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03989 | train |
v1 | Schema:
staff (alias: xnob)(code, value, amount, level)
regions(amount, date, salary, code)
Task: Select code from staff where code exists in regions for the same id.
SQL: | SELECT code FROM staff AS xnob
WHERE code IN (
SELECT code FROM regions AS okiv
WHERE okiv.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "regions",
"outer_alias": "xnob",
"inner_alias": "okiv",
"proj_col": "code",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_03990 | train |
v2 | Schema:
branches (alias: agov)(type, level, value, name)
items(status, level, value, type)
Task: Retrieve amount from branches that have at least one corresponding entry in items sharing the same code.
SQL: | SELECT amount FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "items",
"outer_alias": "agov",
"inner_alias": "ikob",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_03991 | train |
v3 | Schema:
tasks (alias: znob)(type, name, value, salary)
products(value, level, type, code)
Task: Retrieve value from tasks with amount above the MAX(amount) of products rows sharing the same code.
SQL: | SELECT value FROM tasks AS znob
WHERE amount > (
SELECT MAX(amount) FROM products AS nad
WHERE nad.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "products",
"outer_alias": "znob",
"inner_alias": "nad",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_03992 | train |
v1 | Schema:
regions (alias: okiv)(status, id, level, name)
sales(status, date, code, level)
Task: Select name from regions where id exists in sales for the same id.
SQL: | SELECT name FROM regions AS okiv
WHERE id IN (
SELECT id FROM sales AS cif
WHERE cif.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "sales",
"outer_alias": "okiv",
"inner_alias": "cif",
"proj_col": "name",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03993 | train |
v1 | Schema:
tasks (alias: znob)(name, value, code, type)
employees(type, date, name, id)
Task: Select value from tasks where id exists in employees for the same code.
SQL: | SELECT value FROM tasks AS znob
WHERE id IN (
SELECT id FROM employees AS bev
WHERE bev.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "employees",
"outer_alias": "znob",
"inner_alias": "bev",
"proj_col": "value",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_03994 | train |
v1 | Schema:
orders (alias: kab)(id, type, level, value)
invoices(date, status, level, amount)
Task: Find id from orders where status appears in invoices entries with matching code.
SQL: | SELECT id FROM orders AS kab
WHERE status IN (
SELECT status FROM invoices AS fal
WHERE fal.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "invoices",
"outer_alias": "kab",
"inner_alias": "fal",
"proj_col": "id",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03995 | train |
v2 | Schema:
items (alias: ikob)(status, name, salary, type)
categories(salary, amount, value, date)
Task: Retrieve id from items that have at least one corresponding entry in categories sharing the same status.
SQL: | SELECT id FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "categories",
"outer_alias": "ikob",
"inner_alias": "egiv",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03996 | train |
v1 | Schema:
products (alias: nad)(name, code, status, id)
invoices(type, level, id, salary)
Task: Select value from products where status exists in invoices for the same type.
SQL: | SELECT value FROM products AS nad
WHERE status IN (
SELECT status FROM invoices AS fal
WHERE fal.type = nad.type
); | {
"outer_table": "products",
"inner_table": "invoices",
"outer_alias": "nad",
"inner_alias": "fal",
"proj_col": "value",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03997 | train |
v2 | Schema:
staff (alias: xnob)(type, status, salary, value)
regions(date, level, value, code)
Task: Find salary from staff where a matching record exists in regions with the same status.
SQL: | SELECT salary 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": "salary",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_03998 | train |
v2 | Schema:
branches (alias: agov)(salary, status, code, type)
orders(name, amount, level, salary)
Task: Find code from branches where a matching record exists in orders with the same level.
SQL: | SELECT code FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "orders",
"outer_alias": "agov",
"inner_alias": "kab",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_03999 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.