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:
sales (alias: cif)(name, level, date, amount)
transactions(id, value, salary, code)
Task: Retrieve salary from sales that have at least one corresponding entry in transactions sharing the same code.
SQL: | SELECT salary FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "transactions",
"outer_alias": "cif",
"inner_alias": "gev",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10300 | train |
v2 | Schema:
requests (alias: ejof)(status, salary, name, amount)
orders(status, amount, date, value)
Task: Retrieve value from requests that have at least one corresponding entry in orders sharing the same code.
SQL: | SELECT value FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "orders",
"outer_alias": "ejof",
"inner_alias": "kab",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_10301 | train |
v3 | Schema:
accounts (alias: jac)(salary, id, code, level)
invoices(type, level, name, amount)
Task: Find value from accounts where amount exceeds the total salary from invoices for the same id.
SQL: | SELECT value FROM accounts AS jac
WHERE amount > (
SELECT SUM(salary) FROM invoices AS fal
WHERE fal.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "invoices",
"outer_alias": "jac",
"inner_alias": "fal",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10302 | train |
v3 | Schema:
tasks (alias: znob)(amount, id, type, salary)
departments(amount, id, value, name)
Task: Retrieve id from tasks with salary above the MAX(amount) of departments rows sharing the same code.
SQL: | SELECT id FROM tasks AS znob
WHERE salary > (
SELECT MAX(amount) FROM departments AS dov
WHERE dov.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "departments",
"outer_alias": "znob",
"inner_alias": "dov",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_10303 | train |
v1 | Schema:
tasks (alias: znob)(salary, code, name, type)
accounts(date, status, amount, salary)
Task: Retrieve code from tasks whose status is found in accounts rows where code matches the outer record.
SQL: | SELECT code FROM tasks AS znob
WHERE status IN (
SELECT status FROM accounts AS jac
WHERE jac.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "accounts",
"outer_alias": "znob",
"inner_alias": "jac",
"proj_col": "code",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_10304 | train |
v1 | Schema:
branches (alias: agov)(amount, id, name, salary)
departments(id, salary, date, amount)
Task: Find code from branches where id appears in departments entries with matching code.
SQL: | SELECT code FROM branches AS agov
WHERE id IN (
SELECT id FROM departments AS dov
WHERE dov.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "departments",
"outer_alias": "agov",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_10305 | train |
v1 | Schema:
projects (alias: uliv)(amount, salary, value, id)
branches(value, type, level, name)
Task: Select id from projects where code exists in branches for the same level.
SQL: | SELECT id FROM projects AS uliv
WHERE code IN (
SELECT code FROM branches AS agov
WHERE agov.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "branches",
"outer_alias": "uliv",
"inner_alias": "agov",
"proj_col": "id",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_10306 | train |
v2 | Schema:
sales (alias: cif)(status, level, id, type)
customers(salary, status, type, value)
Task: Retrieve code from sales that have at least one corresponding entry in customers sharing the same id.
SQL: | SELECT code FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "customers",
"outer_alias": "cif",
"inner_alias": "lex",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10307 | train |
v3 | Schema:
employees (alias: bev)(amount, date, value, level)
regions(level, name, id, date)
Task: Retrieve name from employees with salary above the COUNT(salary) of regions rows sharing the same id.
SQL: | SELECT name FROM employees AS bev
WHERE salary > (
SELECT COUNT(salary) FROM regions AS okiv
WHERE okiv.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "regions",
"outer_alias": "bev",
"inner_alias": "okiv",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10308 | train |
v2 | Schema:
schedules (alias: vmob)(amount, id, status, date)
regions(value, name, status, amount)
Task: Find value from schedules where a matching record exists in regions with the same type.
SQL: | SELECT value FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "regions",
"outer_alias": "vmob",
"inner_alias": "okiv",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_10309 | train |
v3 | Schema:
regions (alias: okiv)(date, level, amount, code)
requests(amount, salary, code, type)
Task: Find amount from regions where salary exceeds the total amount from requests for the same status.
SQL: | SELECT amount FROM regions AS okiv
WHERE salary > (
SELECT SUM(amount) FROM requests AS ejof
WHERE ejof.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "requests",
"outer_alias": "okiv",
"inner_alias": "ejof",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_10310 | train |
v2 | Schema:
requests (alias: ejof)(date, name, code, salary)
sales(date, type, value, id)
Task: Retrieve name from requests that have at least one corresponding entry in sales sharing the same level.
SQL: | SELECT name FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "sales",
"outer_alias": "ejof",
"inner_alias": "cif",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_10311 | train |
v1 | Schema:
invoices (alias: fal)(id, name, salary, date)
projects(type, status, amount, name)
Task: Retrieve salary from invoices whose level is found in projects rows where type matches the outer record.
SQL: | SELECT salary FROM invoices AS fal
WHERE level IN (
SELECT level FROM projects AS uliv
WHERE uliv.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "projects",
"outer_alias": "fal",
"inner_alias": "uliv",
"proj_col": "salary",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10312 | train |
v3 | Schema:
tasks (alias: znob)(name, salary, value, level)
orders(level, amount, date, id)
Task: Retrieve name from tasks with value above the COUNT(salary) of orders rows sharing the same status.
SQL: | SELECT name FROM tasks AS znob
WHERE value > (
SELECT COUNT(salary) FROM orders AS kab
WHERE kab.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "orders",
"outer_alias": "znob",
"inner_alias": "kab",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_10313 | train |
v3 | Schema:
transactions (alias: gev)(id, amount, name, type)
regions(type, id, value, salary)
Task: Retrieve name from transactions with salary above the COUNT(value) of regions rows sharing the same code.
SQL: | SELECT name FROM transactions AS gev
WHERE salary > (
SELECT COUNT(value) FROM regions AS okiv
WHERE okiv.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "regions",
"outer_alias": "gev",
"inner_alias": "okiv",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10314 | train |
v2 | Schema:
staff (alias: xnob)(salary, type, value, id)
managers(name, level, value, amount)
Task: Retrieve code from staff that have at least one corresponding entry in managers sharing the same status.
SQL: | SELECT code FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "managers",
"outer_alias": "xnob",
"inner_alias": "hac",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_10315 | train |
v2 | Schema:
requests (alias: ejof)(type, amount, value, code)
departments(amount, salary, level, date)
Task: Retrieve id from requests that have at least one corresponding entry in departments sharing the same id.
SQL: | SELECT id FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "departments",
"outer_alias": "ejof",
"inner_alias": "dov",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_10316 | train |
v2 | Schema:
schedules (alias: vmob)(type, status, level, code)
branches(status, id, type, salary)
Task: Find name from schedules where a matching record exists in branches with the same code.
SQL: | SELECT name FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "branches",
"outer_alias": "vmob",
"inner_alias": "agov",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_10317 | train |
v2 | Schema:
transactions (alias: gev)(salary, level, amount, id)
orders(date, type, level, value)
Task: Retrieve id from transactions that have at least one corresponding entry in orders sharing the same level.
SQL: | SELECT id FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "orders",
"outer_alias": "gev",
"inner_alias": "kab",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10318 | train |
v3 | Schema:
departments (alias: dov)(type, amount, id, value)
transactions(type, value, date, salary)
Task: Find name from departments where value exceeds the count of amount from transactions for the same type.
SQL: | SELECT name FROM departments AS dov
WHERE value > (
SELECT COUNT(amount) FROM transactions AS gev
WHERE gev.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "transactions",
"outer_alias": "dov",
"inner_alias": "gev",
"proj_col": "name",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10319 | train |
v3 | Schema:
tasks (alias: znob)(level, value, type, status)
regions(id, level, salary, status)
Task: Find value from tasks where value exceeds the maximum salary from regions for the same code.
SQL: | SELECT value FROM tasks AS znob
WHERE value > (
SELECT MAX(salary) FROM regions AS okiv
WHERE okiv.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "regions",
"outer_alias": "znob",
"inner_alias": "okiv",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_10320 | train |
v3 | Schema:
categories (alias: egiv)(date, code, type, status)
shipments(level, id, code, status)
Task: Retrieve name from categories with salary above the AVG(value) of shipments rows sharing the same level.
SQL: | SELECT name FROM categories AS egiv
WHERE salary > (
SELECT AVG(value) FROM shipments AS vnob
WHERE vnob.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "shipments",
"outer_alias": "egiv",
"inner_alias": "vnob",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_10321 | train |
v1 | Schema:
tasks (alias: znob)(name, value, date, code)
employees(amount, date, id, type)
Task: Select id from tasks where status exists in employees for the same type.
SQL: | SELECT id FROM tasks AS znob
WHERE status IN (
SELECT status FROM employees AS bev
WHERE bev.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "employees",
"outer_alias": "znob",
"inner_alias": "bev",
"proj_col": "id",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_10322 | train |
v3 | Schema:
regions (alias: okiv)(type, salary, id, level)
managers(name, status, value, type)
Task: Find salary from regions where amount exceeds the average salary from managers for the same type.
SQL: | SELECT salary FROM regions AS okiv
WHERE amount > (
SELECT AVG(salary) FROM managers AS hac
WHERE hac.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "managers",
"outer_alias": "okiv",
"inner_alias": "hac",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_10323 | train |
v2 | Schema:
products (alias: nad)(level, id, code, amount)
tasks(salary, value, level, name)
Task: Find salary from products where a matching record exists in tasks with the same status.
SQL: | SELECT salary FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.status = nad.status
); | {
"outer_table": "products",
"inner_table": "tasks",
"outer_alias": "nad",
"inner_alias": "znob",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10324 | train |
v2 | Schema:
regions (alias: okiv)(id, salary, type, value)
customers(type, name, status, salary)
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_10325 | train |
v3 | Schema:
orders (alias: kab)(salary, type, amount, code)
schedules(value, type, name, date)
Task: Find value from orders where salary exceeds the average value from schedules for the same id.
SQL: | SELECT value FROM orders AS kab
WHERE salary > (
SELECT AVG(value) FROM schedules AS vmob
WHERE vmob.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "schedules",
"outer_alias": "kab",
"inner_alias": "vmob",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10326 | train |
v1 | Schema:
managers (alias: hac)(date, value, status, amount)
customers(value, salary, code, id)
Task: Select name from managers where id exists in customers for the same type.
SQL: | SELECT name FROM managers AS hac
WHERE id IN (
SELECT id FROM customers AS lex
WHERE lex.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "customers",
"outer_alias": "hac",
"inner_alias": "lex",
"proj_col": "name",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10327 | train |
v1 | Schema:
transactions (alias: gev)(level, value, name, id)
invoices(code, date, type, status)
Task: Select value from transactions where code exists in invoices for the same id.
SQL: | SELECT value FROM transactions AS gev
WHERE code IN (
SELECT code FROM invoices AS fal
WHERE fal.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "invoices",
"outer_alias": "gev",
"inner_alias": "fal",
"proj_col": "value",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10328 | train |
v2 | Schema:
employees (alias: bev)(id, value, amount, status)
branches(name, code, date, id)
Task: Find value from employees where a matching record exists in branches with the same status.
SQL: | SELECT value FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "branches",
"outer_alias": "bev",
"inner_alias": "agov",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10329 | train |
v3 | Schema:
categories (alias: egiv)(date, name, id, value)
projects(date, amount, salary, value)
Task: Retrieve id from categories with value above the AVG(value) of projects rows sharing the same type.
SQL: | SELECT id FROM categories AS egiv
WHERE value > (
SELECT AVG(value) FROM projects AS uliv
WHERE uliv.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "projects",
"outer_alias": "egiv",
"inner_alias": "uliv",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_10330 | train |
v3 | Schema:
projects (alias: uliv)(type, amount, date, value)
requests(value, id, level, amount)
Task: Retrieve id from projects with value above the AVG(value) of requests rows sharing the same id.
SQL: | SELECT id FROM projects AS uliv
WHERE value > (
SELECT AVG(value) FROM requests AS ejof
WHERE ejof.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "requests",
"outer_alias": "uliv",
"inner_alias": "ejof",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_10331 | train |
v2 | Schema:
requests (alias: ejof)(salary, level, type, amount)
items(amount, date, value, id)
Task: Retrieve salary from requests that have at least one corresponding entry in items sharing the same level.
SQL: | SELECT salary FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "items",
"outer_alias": "ejof",
"inner_alias": "ikob",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_10332 | train |
v3 | Schema:
categories (alias: egiv)(type, status, code, id)
schedules(salary, status, value, type)
Task: Retrieve id from categories with amount above the AVG(amount) of schedules rows sharing the same type.
SQL: | SELECT id FROM categories AS egiv
WHERE amount > (
SELECT AVG(amount) FROM schedules AS vmob
WHERE vmob.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "schedules",
"outer_alias": "egiv",
"inner_alias": "vmob",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_10333 | train |
v3 | Schema:
regions (alias: okiv)(status, salary, id, amount)
staff(date, status, code, name)
Task: Find salary from regions where salary exceeds the maximum value from staff for the same status.
SQL: | SELECT salary FROM regions AS okiv
WHERE salary > (
SELECT MAX(value) FROM staff AS xnob
WHERE xnob.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "staff",
"outer_alias": "okiv",
"inner_alias": "xnob",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_10334 | train |
v1 | Schema:
transactions (alias: gev)(salary, date, status, level)
items(amount, id, date, value)
Task: Retrieve value from transactions whose status is found in items rows where status matches the outer record.
SQL: | SELECT value FROM transactions AS gev
WHERE status IN (
SELECT status FROM items AS ikob
WHERE ikob.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "items",
"outer_alias": "gev",
"inner_alias": "ikob",
"proj_col": "value",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10335 | train |
v3 | Schema:
requests (alias: ejof)(salary, value, status, date)
customers(name, salary, id, status)
Task: Retrieve salary from requests with amount above the SUM(value) of customers rows sharing the same level.
SQL: | SELECT salary FROM requests AS ejof
WHERE amount > (
SELECT SUM(value) FROM customers AS lex
WHERE lex.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "customers",
"outer_alias": "ejof",
"inner_alias": "lex",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_10336 | train |
v2 | Schema:
transactions (alias: gev)(date, code, value, type)
projects(salary, type, status, code)
Task: Find value from transactions where a matching record exists in projects with the same level.
SQL: | SELECT value FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "projects",
"outer_alias": "gev",
"inner_alias": "uliv",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10337 | train |
v3 | Schema:
staff (alias: xnob)(salary, level, name, code)
invoices(code, amount, status, date)
Task: Find salary from staff where value exceeds the count of amount from invoices for the same code.
SQL: | SELECT salary FROM staff AS xnob
WHERE value > (
SELECT COUNT(amount) FROM invoices AS fal
WHERE fal.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "invoices",
"outer_alias": "xnob",
"inner_alias": "fal",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_10338 | train |
v3 | Schema:
transactions (alias: gev)(value, name, status, date)
items(date, id, name, code)
Task: Find id from transactions where value exceeds the minimum amount from items for the same id.
SQL: | SELECT id FROM transactions AS gev
WHERE value > (
SELECT MIN(amount) FROM items AS ikob
WHERE ikob.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "items",
"outer_alias": "gev",
"inner_alias": "ikob",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10339 | train |
v2 | Schema:
transactions (alias: gev)(id, code, amount, date)
managers(date, status, salary, type)
Task: Find name from transactions where a matching record exists in managers with the same code.
SQL: | SELECT name FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "managers",
"outer_alias": "gev",
"inner_alias": "hac",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10340 | train |
v1 | Schema:
regions (alias: okiv)(salary, amount, id, status)
orders(level, value, date, amount)
Task: Retrieve amount from regions whose type is found in orders rows where level matches the outer record.
SQL: | SELECT amount FROM regions AS okiv
WHERE type IN (
SELECT type FROM orders AS kab
WHERE kab.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "orders",
"outer_alias": "okiv",
"inner_alias": "kab",
"proj_col": "amount",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_10341 | train |
v2 | Schema:
invoices (alias: fal)(salary, code, id, name)
products(value, amount, status, type)
Task: Retrieve value from invoices that have at least one corresponding entry in products sharing the same id.
SQL: | SELECT value FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "products",
"outer_alias": "fal",
"inner_alias": "nad",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10342 | train |
v3 | Schema:
shipments (alias: vnob)(name, level, value, id)
managers(status, type, amount, id)
Task: Retrieve salary from shipments with salary above the COUNT(salary) of managers rows sharing the same level.
SQL: | SELECT salary FROM shipments AS vnob
WHERE salary > (
SELECT COUNT(salary) FROM managers AS hac
WHERE hac.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "managers",
"outer_alias": "vnob",
"inner_alias": "hac",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_10343 | train |
v2 | Schema:
managers (alias: hac)(amount, name, date, salary)
regions(code, date, status, value)
Task: Find value from managers where a matching record exists in regions with the same level.
SQL: | SELECT value FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "regions",
"outer_alias": "hac",
"inner_alias": "okiv",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10344 | train |
v1 | Schema:
orders (alias: kab)(salary, date, type, value)
regions(status, code, type, date)
Task: Find name from orders where status appears in regions entries with matching status.
SQL: | SELECT name FROM orders AS kab
WHERE status IN (
SELECT status FROM regions AS okiv
WHERE okiv.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "regions",
"outer_alias": "kab",
"inner_alias": "okiv",
"proj_col": "name",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10345 | train |
v3 | Schema:
staff (alias: xnob)(status, date, value, salary)
shipments(name, date, salary, level)
Task: Find id from staff where amount exceeds the total amount from shipments for the same code.
SQL: | SELECT id FROM staff AS xnob
WHERE amount > (
SELECT SUM(amount) FROM shipments AS vnob
WHERE vnob.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "shipments",
"outer_alias": "xnob",
"inner_alias": "vnob",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_10346 | train |
v2 | Schema:
requests (alias: ejof)(name, date, level, type)
departments(name, level, id, salary)
Task: Retrieve id from requests that have at least one corresponding entry in departments sharing the same level.
SQL: | SELECT id FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "departments",
"outer_alias": "ejof",
"inner_alias": "dov",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_10347 | train |
v1 | Schema:
requests (alias: ejof)(id, value, type, status)
categories(status, value, level, id)
Task: Find value from requests where code appears in categories entries with matching status.
SQL: | SELECT value FROM requests AS ejof
WHERE code IN (
SELECT code FROM categories AS egiv
WHERE egiv.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "categories",
"outer_alias": "ejof",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_10348 | train |
v1 | Schema:
items (alias: ikob)(value, date, amount, status)
shipments(date, salary, value, level)
Task: Select name from items where status exists in shipments for the same code.
SQL: | SELECT name FROM items AS ikob
WHERE status IN (
SELECT status FROM shipments AS vnob
WHERE vnob.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "shipments",
"outer_alias": "ikob",
"inner_alias": "vnob",
"proj_col": "name",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_10349 | train |
v2 | Schema:
schedules (alias: vmob)(value, type, code, date)
staff(code, status, name, level)
Task: Retrieve value from schedules that have at least one corresponding entry in staff sharing the same id.
SQL: | SELECT value FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "staff",
"outer_alias": "vmob",
"inner_alias": "xnob",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_10350 | train |
v2 | Schema:
requests (alias: ejof)(value, status, salary, amount)
customers(salary, date, code, amount)
Task: Find id from requests where a matching record exists in customers with the same id.
SQL: | SELECT id FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "customers",
"outer_alias": "ejof",
"inner_alias": "lex",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_10351 | train |
v1 | Schema:
accounts (alias: jac)(code, salary, type, level)
sales(salary, type, code, name)
Task: Find id from accounts where status appears in sales entries with matching type.
SQL: | SELECT id FROM accounts AS jac
WHERE status IN (
SELECT status FROM sales AS cif
WHERE cif.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "sales",
"outer_alias": "jac",
"inner_alias": "cif",
"proj_col": "id",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10352 | train |
v1 | Schema:
projects (alias: uliv)(value, salary, code, id)
managers(salary, date, value, code)
Task: Find salary from projects where code appears in managers entries with matching code.
SQL: | SELECT salary FROM projects AS uliv
WHERE code IN (
SELECT code FROM managers AS hac
WHERE hac.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "managers",
"outer_alias": "uliv",
"inner_alias": "hac",
"proj_col": "salary",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_10353 | train |
v3 | Schema:
customers (alias: lex)(level, value, amount, type)
items(name, id, type, amount)
Task: Retrieve amount from customers with value above the SUM(value) of items rows sharing the same level.
SQL: | SELECT amount FROM customers AS lex
WHERE value > (
SELECT SUM(value) FROM items AS ikob
WHERE ikob.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "items",
"outer_alias": "lex",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10354 | train |
v3 | Schema:
schedules (alias: vmob)(salary, level, id, value)
sales(status, type, value, level)
Task: Retrieve id from schedules with salary above the AVG(amount) of sales rows sharing the same type.
SQL: | SELECT id FROM schedules AS vmob
WHERE salary > (
SELECT AVG(amount) FROM sales AS cif
WHERE cif.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "sales",
"outer_alias": "vmob",
"inner_alias": "cif",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_10355 | train |
v3 | Schema:
branches (alias: agov)(value, date, amount, salary)
tasks(name, id, salary, type)
Task: Retrieve salary from branches with value above the COUNT(amount) of tasks rows sharing the same level.
SQL: | SELECT salary FROM branches AS agov
WHERE value > (
SELECT COUNT(amount) FROM tasks AS znob
WHERE znob.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "tasks",
"outer_alias": "agov",
"inner_alias": "znob",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_10356 | train |
v2 | Schema:
shipments (alias: vnob)(name, id, type, code)
accounts(value, date, status, name)
Task: Retrieve id from shipments that have at least one corresponding entry in accounts sharing the same level.
SQL: | SELECT id 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": "id",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_10357 | train |
v2 | Schema:
orders (alias: kab)(level, name, id, status)
items(value, date, amount, name)
Task: Find id from orders where a matching record exists in items with the same code.
SQL: | SELECT id FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "items",
"outer_alias": "kab",
"inner_alias": "ikob",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10358 | train |
v2 | Schema:
branches (alias: agov)(date, code, status, id)
transactions(value, status, date, type)
Task: Find id from branches where a matching record exists in transactions with the same code.
SQL: | SELECT id FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "transactions",
"outer_alias": "agov",
"inner_alias": "gev",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_10359 | train |
v2 | Schema:
requests (alias: ejof)(id, date, code, salary)
projects(salary, name, type, status)
Task: Retrieve code from requests that have at least one corresponding entry in projects sharing the same code.
SQL: | SELECT code FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "projects",
"outer_alias": "ejof",
"inner_alias": "uliv",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_10360 | train |
v1 | Schema:
shipments (alias: vnob)(status, date, code, salary)
requests(type, value, status, id)
Task: Retrieve value from shipments whose id is found in requests rows where type matches the outer record.
SQL: | SELECT value FROM shipments AS vnob
WHERE id IN (
SELECT id FROM requests AS ejof
WHERE ejof.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "requests",
"outer_alias": "vnob",
"inner_alias": "ejof",
"proj_col": "value",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_10361 | train |
v3 | Schema:
orders (alias: kab)(id, status, name, amount)
customers(date, name, value, level)
Task: Retrieve salary from orders with amount above the MAX(salary) of customers rows sharing the same id.
SQL: | SELECT salary FROM orders AS kab
WHERE amount > (
SELECT MAX(salary) FROM customers AS lex
WHERE lex.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "customers",
"outer_alias": "kab",
"inner_alias": "lex",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10362 | train |
v2 | Schema:
invoices (alias: fal)(value, status, code, id)
customers(value, type, status, name)
Task: Retrieve code from invoices that have at least one corresponding entry in customers sharing the same level.
SQL: | SELECT code FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "customers",
"outer_alias": "fal",
"inner_alias": "lex",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10363 | train |
v2 | Schema:
customers (alias: lex)(status, level, salary, name)
projects(level, salary, value, id)
Task: Find code from customers where a matching record exists in projects with the same level.
SQL: | SELECT code FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "projects",
"outer_alias": "lex",
"inner_alias": "uliv",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10364 | train |
v1 | Schema:
tasks (alias: znob)(status, value, name, date)
regions(status, value, date, level)
Task: Find amount from tasks where id appears in regions entries with matching type.
SQL: | SELECT amount FROM tasks AS znob
WHERE id IN (
SELECT id FROM regions AS okiv
WHERE okiv.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "regions",
"outer_alias": "znob",
"inner_alias": "okiv",
"proj_col": "amount",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_10365 | train |
v1 | Schema:
schedules (alias: vmob)(date, salary, id, name)
invoices(name, salary, status, level)
Task: Retrieve value from schedules whose status is found in invoices rows where status matches the outer record.
SQL: | SELECT value FROM schedules AS vmob
WHERE status IN (
SELECT status FROM invoices AS fal
WHERE fal.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "invoices",
"outer_alias": "vmob",
"inner_alias": "fal",
"proj_col": "value",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_10366 | train |
v3 | Schema:
customers (alias: lex)(id, code, date, amount)
invoices(salary, status, value, code)
Task: Find name from customers where salary exceeds the average value from invoices for the same status.
SQL: | SELECT name FROM customers AS lex
WHERE salary > (
SELECT AVG(value) FROM invoices AS fal
WHERE fal.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "invoices",
"outer_alias": "lex",
"inner_alias": "fal",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10367 | train |
v2 | Schema:
tasks (alias: znob)(date, level, salary, name)
shipments(status, value, id, date)
Task: Find id from tasks where a matching record exists in shipments with the same id.
SQL: | SELECT id FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "shipments",
"outer_alias": "znob",
"inner_alias": "vnob",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_10368 | train |
v1 | Schema:
shipments (alias: vnob)(amount, name, salary, value)
projects(amount, id, status, level)
Task: Retrieve salary from shipments whose type is found in projects rows where status matches the outer record.
SQL: | SELECT salary FROM shipments AS vnob
WHERE type IN (
SELECT type FROM projects AS uliv
WHERE uliv.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "projects",
"outer_alias": "vnob",
"inner_alias": "uliv",
"proj_col": "salary",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_10369 | train |
v2 | Schema:
staff (alias: xnob)(date, type, name, level)
schedules(type, value, id, level)
Task: Retrieve code from staff that have at least one corresponding entry in schedules sharing the same id.
SQL: | SELECT code 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": "code",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_10370 | train |
v2 | Schema:
products (alias: nad)(value, type, level, name)
customers(type, date, salary, name)
Task: Find id from products where a matching record exists in customers with the same type.
SQL: | SELECT id FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.type = nad.type
); | {
"outer_table": "products",
"inner_table": "customers",
"outer_alias": "nad",
"inner_alias": "lex",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10371 | train |
v3 | Schema:
orders (alias: kab)(name, amount, type, date)
departments(amount, date, name, level)
Task: Find code from orders where value exceeds the average amount from departments for the same id.
SQL: | SELECT code FROM orders AS kab
WHERE value > (
SELECT AVG(amount) FROM departments AS dov
WHERE dov.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "departments",
"outer_alias": "kab",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10372 | train |
v3 | Schema:
customers (alias: lex)(id, amount, level, salary)
items(status, type, level, name)
Task: Find name from customers where amount exceeds the minimum value from items for the same id.
SQL: | SELECT name FROM customers AS lex
WHERE amount > (
SELECT MIN(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": "MIN",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10373 | train |
v2 | Schema:
branches (alias: agov)(id, salary, value, level)
tasks(date, value, status, level)
Task: Find name from branches where a matching record exists in tasks with the same status.
SQL: | SELECT name FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "tasks",
"outer_alias": "agov",
"inner_alias": "znob",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_10374 | train |
v1 | Schema:
transactions (alias: gev)(amount, level, name, id)
items(name, status, level, amount)
Task: Retrieve name from transactions whose status is found in items rows where level matches the outer record.
SQL: | SELECT name FROM transactions AS gev
WHERE status IN (
SELECT status FROM items AS ikob
WHERE ikob.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "items",
"outer_alias": "gev",
"inner_alias": "ikob",
"proj_col": "name",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10375 | train |
v3 | Schema:
tasks (alias: znob)(status, salary, code, amount)
managers(id, amount, date, name)
Task: Find salary from tasks where amount exceeds the total value from managers for the same type.
SQL: | SELECT salary FROM tasks AS znob
WHERE amount > (
SELECT SUM(value) FROM managers AS hac
WHERE hac.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "managers",
"outer_alias": "znob",
"inner_alias": "hac",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_10376 | train |
v2 | Schema:
shipments (alias: vnob)(code, amount, type, value)
transactions(id, date, status, level)
Task: Retrieve amount from shipments that have at least one corresponding entry in transactions sharing the same id.
SQL: | SELECT amount FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "transactions",
"outer_alias": "vnob",
"inner_alias": "gev",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_10377 | train |
v2 | Schema:
invoices (alias: fal)(amount, type, level, code)
tasks(status, date, level, name)
Task: Find id from invoices where a matching record exists in tasks with the same status.
SQL: | SELECT id FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "tasks",
"outer_alias": "fal",
"inner_alias": "znob",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10378 | train |
v2 | Schema:
managers (alias: hac)(id, amount, level, code)
customers(level, amount, code, status)
Task: Retrieve value from managers that have at least one corresponding entry in customers sharing the same status.
SQL: | SELECT value FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "customers",
"outer_alias": "hac",
"inner_alias": "lex",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10379 | train |
v2 | Schema:
tasks (alias: znob)(status, salary, date, value)
employees(amount, code, level, status)
Task: Retrieve code from tasks that have at least one corresponding entry in employees sharing the same level.
SQL: | SELECT code FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "employees",
"outer_alias": "znob",
"inner_alias": "bev",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_10380 | train |
v2 | Schema:
orders (alias: kab)(type, status, amount, date)
regions(status, id, value, code)
Task: Find salary from orders where a matching record exists in regions with the same level.
SQL: | SELECT salary FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "regions",
"outer_alias": "kab",
"inner_alias": "okiv",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10381 | train |
v1 | Schema:
managers (alias: hac)(salary, amount, name, status)
accounts(code, status, name, date)
Task: Retrieve amount from managers whose code is found in accounts rows where status matches the outer record.
SQL: | SELECT amount FROM managers AS hac
WHERE code IN (
SELECT code FROM accounts AS jac
WHERE jac.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "accounts",
"outer_alias": "hac",
"inner_alias": "jac",
"proj_col": "amount",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10382 | train |
v2 | Schema:
projects (alias: uliv)(date, type, value, level)
products(type, code, value, salary)
Task: Retrieve amount from projects that have at least one corresponding entry in products sharing the same status.
SQL: | SELECT amount FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "products",
"outer_alias": "uliv",
"inner_alias": "nad",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_10383 | train |
v2 | Schema:
items (alias: ikob)(code, value, id, level)
customers(name, value, date, level)
Task: Find amount from items where a matching record exists in customers with the same id.
SQL: | SELECT amount FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "customers",
"outer_alias": "ikob",
"inner_alias": "lex",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_10384 | train |
v1 | Schema:
sales (alias: cif)(id, status, level, type)
shipments(amount, type, status, date)
Task: Select id from sales where id exists in shipments for the same code.
SQL: | SELECT id FROM sales AS cif
WHERE id IN (
SELECT id FROM shipments AS vnob
WHERE vnob.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "shipments",
"outer_alias": "cif",
"inner_alias": "vnob",
"proj_col": "id",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10385 | train |
v2 | Schema:
items (alias: ikob)(type, level, name, date)
orders(amount, salary, status, id)
Task: Retrieve amount from items that have at least one corresponding entry in orders sharing the same id.
SQL: | SELECT amount FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "orders",
"outer_alias": "ikob",
"inner_alias": "kab",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_10386 | train |
v2 | Schema:
invoices (alias: fal)(type, name, date, status)
sales(status, level, date, name)
Task: Find name from invoices where a matching record exists in sales with the same type.
SQL: | SELECT name FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "sales",
"outer_alias": "fal",
"inner_alias": "cif",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10387 | train |
v2 | Schema:
items (alias: ikob)(value, id, name, salary)
tasks(code, salary, level, name)
Task: Find code from items where a matching record exists in tasks with the same level.
SQL: | SELECT code FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "tasks",
"outer_alias": "ikob",
"inner_alias": "znob",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_10388 | train |
v2 | Schema:
items (alias: ikob)(salary, code, amount, level)
employees(value, salary, level, date)
Task: Find amount from items where a matching record exists in employees with the same code.
SQL: | SELECT amount FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "employees",
"outer_alias": "ikob",
"inner_alias": "bev",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_10389 | train |
v2 | Schema:
projects (alias: uliv)(id, level, amount, salary)
managers(amount, value, status, code)
Task: Retrieve amount from projects that have at least one corresponding entry in managers sharing the same level.
SQL: | SELECT amount FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "managers",
"outer_alias": "uliv",
"inner_alias": "hac",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_10390 | train |
v3 | Schema:
products (alias: nad)(value, status, salary, amount)
requests(date, type, status, code)
Task: Retrieve salary from products with amount above the AVG(salary) of requests rows sharing the same id.
SQL: | SELECT salary FROM products AS nad
WHERE amount > (
SELECT AVG(salary) FROM requests AS ejof
WHERE ejof.id = nad.id
); | {
"outer_table": "products",
"inner_table": "requests",
"outer_alias": "nad",
"inner_alias": "ejof",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10391 | train |
v1 | Schema:
sales (alias: cif)(code, status, type, id)
categories(code, date, amount, value)
Task: Retrieve value from sales whose level is found in categories rows where status matches the outer record.
SQL: | SELECT value FROM sales AS cif
WHERE level IN (
SELECT level FROM categories AS egiv
WHERE egiv.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "categories",
"outer_alias": "cif",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10392 | train |
v2 | Schema:
projects (alias: uliv)(status, date, code, amount)
items(date, type, code, value)
Task: Retrieve amount from projects that have at least one corresponding entry in items sharing the same type.
SQL: | SELECT amount FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "items",
"outer_alias": "uliv",
"inner_alias": "ikob",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_10393 | train |
v3 | Schema:
managers (alias: hac)(code, date, name, amount)
branches(amount, level, date, type)
Task: Retrieve name from managers with salary above the MAX(salary) of branches rows sharing the same type.
SQL: | SELECT name FROM managers AS hac
WHERE salary > (
SELECT MAX(salary) FROM branches AS agov
WHERE agov.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "branches",
"outer_alias": "hac",
"inner_alias": "agov",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10394 | train |
v3 | Schema:
schedules (alias: vmob)(salary, value, amount, id)
categories(date, level, code, name)
Task: Retrieve value from schedules with value above the SUM(amount) of categories rows sharing the same type.
SQL: | SELECT value FROM schedules AS vmob
WHERE value > (
SELECT SUM(amount) FROM categories AS egiv
WHERE egiv.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "categories",
"outer_alias": "vmob",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_10395 | train |
v2 | Schema:
sales (alias: cif)(type, id, name, status)
items(type, id, code, date)
Task: Find salary from sales where a matching record exists in items with the same id.
SQL: | SELECT salary FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "items",
"outer_alias": "cif",
"inner_alias": "ikob",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10396 | train |
v3 | Schema:
products (alias: nad)(status, value, code, id)
transactions(value, id, code, status)
Task: Find id from products where salary exceeds the total value from transactions for the same code.
SQL: | SELECT id FROM products AS nad
WHERE salary > (
SELECT SUM(value) FROM transactions AS gev
WHERE gev.code = nad.code
); | {
"outer_table": "products",
"inner_table": "transactions",
"outer_alias": "nad",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_10397 | train |
v1 | Schema:
requests (alias: ejof)(status, value, code, id)
items(date, name, level, value)
Task: Retrieve value from requests whose status is found in items rows where id matches the outer record.
SQL: | SELECT value FROM requests AS ejof
WHERE status IN (
SELECT status FROM items AS ikob
WHERE ikob.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "items",
"outer_alias": "ejof",
"inner_alias": "ikob",
"proj_col": "value",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_10398 | train |
v2 | Schema:
branches (alias: agov)(level, status, amount, code)
managers(amount, code, salary, level)
Task: Retrieve name from branches that have at least one corresponding entry in managers sharing the same level.
SQL: | SELECT name FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "managers",
"outer_alias": "agov",
"inner_alias": "hac",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_10399 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.