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:
products (alias: nad)(level, id, salary, amount)
staff(name, type, amount, salary)
Task: Retrieve code from products that have at least one corresponding entry in staff sharing the same level.
SQL: | SELECT code FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.level = nad.level
); | {
"outer_table": "products",
"inner_table": "staff",
"outer_alias": "nad",
"inner_alias": "xnob",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03800 | train |
v2 | Schema:
products (alias: nad)(salary, amount, type, date)
schedules(amount, date, type, level)
Task: Retrieve amount from products that have at least one corresponding entry in schedules sharing the same id.
SQL: | SELECT amount FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.id = nad.id
); | {
"outer_table": "products",
"inner_table": "schedules",
"outer_alias": "nad",
"inner_alias": "vmob",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03801 | train |
v1 | Schema:
invoices (alias: fal)(salary, type, name, value)
employees(value, status, id, level)
Task: Select value from invoices where status exists in employees for the same code.
SQL: | SELECT value FROM invoices AS fal
WHERE status IN (
SELECT status FROM employees AS bev
WHERE bev.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "employees",
"outer_alias": "fal",
"inner_alias": "bev",
"proj_col": "value",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03802 | train |
v2 | Schema:
requests (alias: ejof)(code, type, name, salary)
orders(status, salary, date, value)
Task: Retrieve code from requests that have at least one corresponding entry in orders sharing the same type.
SQL: | SELECT code FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "orders",
"outer_alias": "ejof",
"inner_alias": "kab",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_03803 | train |
v3 | Schema:
orders (alias: kab)(salary, status, level, id)
accounts(id, salary, code, value)
Task: Retrieve salary from orders with salary above the SUM(value) of accounts rows sharing the same status.
SQL: | SELECT salary FROM orders AS kab
WHERE salary > (
SELECT SUM(value) FROM accounts AS jac
WHERE jac.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "accounts",
"outer_alias": "kab",
"inner_alias": "jac",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03804 | train |
v3 | Schema:
items (alias: ikob)(status, id, code, date)
customers(amount, date, code, status)
Task: Retrieve id from items with value above the AVG(salary) of customers rows sharing the same type.
SQL: | SELECT id FROM items AS ikob
WHERE value > (
SELECT AVG(salary) FROM customers AS lex
WHERE lex.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "customers",
"outer_alias": "ikob",
"inner_alias": "lex",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03805 | train |
v3 | Schema:
schedules (alias: vmob)(code, type, amount, name)
customers(type, value, id, status)
Task: Retrieve value from schedules with amount above the AVG(salary) of customers rows sharing the same id.
SQL: | SELECT value FROM schedules AS vmob
WHERE amount > (
SELECT AVG(salary) FROM customers AS lex
WHERE lex.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "customers",
"outer_alias": "vmob",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_03806 | train |
v1 | Schema:
schedules (alias: vmob)(amount, id, name, date)
tasks(level, name, amount, value)
Task: Retrieve amount from schedules whose id is found in tasks rows where id matches the outer record.
SQL: | SELECT amount FROM schedules AS vmob
WHERE id IN (
SELECT id FROM tasks AS znob
WHERE znob.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "tasks",
"outer_alias": "vmob",
"inner_alias": "znob",
"proj_col": "amount",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_03807 | train |
v1 | Schema:
departments (alias: dov)(type, code, date, value)
products(value, level, status, code)
Task: Select id from departments where type exists in products for the same type.
SQL: | SELECT id FROM departments AS dov
WHERE type IN (
SELECT type FROM products AS nad
WHERE nad.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "products",
"outer_alias": "dov",
"inner_alias": "nad",
"proj_col": "id",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03808 | train |
v2 | Schema:
regions (alias: okiv)(value, id, salary, date)
schedules(salary, level, name, value)
Task: Retrieve code from regions that have at least one corresponding entry in schedules sharing the same id.
SQL: | SELECT code FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "schedules",
"outer_alias": "okiv",
"inner_alias": "vmob",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03809 | train |
v3 | Schema:
customers (alias: lex)(date, level, value, salary)
schedules(date, salary, status, value)
Task: Find code from customers where amount exceeds the maximum value from schedules for the same status.
SQL: | SELECT code FROM customers AS lex
WHERE amount > (
SELECT MAX(value) FROM schedules AS vmob
WHERE vmob.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "schedules",
"outer_alias": "lex",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03810 | train |
v2 | Schema:
sales (alias: cif)(type, id, level, status)
invoices(code, value, status, name)
Task: Find code from sales where a matching record exists in invoices with the same code.
SQL: | SELECT code FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "invoices",
"outer_alias": "cif",
"inner_alias": "fal",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03811 | train |
v1 | Schema:
customers (alias: lex)(date, salary, id, level)
invoices(name, status, code, salary)
Task: Find amount from customers where code appears in invoices entries with matching code.
SQL: | SELECT amount FROM customers AS lex
WHERE code IN (
SELECT code FROM invoices AS fal
WHERE fal.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "invoices",
"outer_alias": "lex",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03812 | train |
v3 | Schema:
projects (alias: uliv)(status, date, amount, name)
tasks(id, status, level, amount)
Task: Retrieve amount from projects with salary above the MAX(value) of tasks rows sharing the same level.
SQL: | SELECT amount FROM projects AS uliv
WHERE salary > (
SELECT MAX(value) FROM tasks AS znob
WHERE znob.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "tasks",
"outer_alias": "uliv",
"inner_alias": "znob",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_03813 | train |
v3 | Schema:
departments (alias: dov)(name, salary, value, type)
requests(type, salary, value, level)
Task: Find amount from departments where salary exceeds the maximum amount from requests for the same status.
SQL: | SELECT amount FROM departments AS dov
WHERE salary > (
SELECT MAX(amount) FROM requests AS ejof
WHERE ejof.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "requests",
"outer_alias": "dov",
"inner_alias": "ejof",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03814 | train |
v1 | Schema:
tasks (alias: znob)(code, level, status, salary)
accounts(id, salary, date, level)
Task: Select salary from tasks where type exists in accounts for the same status.
SQL: | SELECT salary FROM tasks AS znob
WHERE type IN (
SELECT type FROM accounts AS jac
WHERE jac.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "accounts",
"outer_alias": "znob",
"inner_alias": "jac",
"proj_col": "salary",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_03815 | train |
v3 | Schema:
requests (alias: ejof)(value, level, amount, name)
products(salary, level, date, amount)
Task: Retrieve id from requests with value above the MIN(value) of products rows sharing the same status.
SQL: | SELECT id FROM requests AS ejof
WHERE value > (
SELECT MIN(value) FROM products AS nad
WHERE nad.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "products",
"outer_alias": "ejof",
"inner_alias": "nad",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_03816 | train |
v3 | Schema:
departments (alias: dov)(type, date, name, status)
tasks(date, level, status, value)
Task: Retrieve value from departments with amount above the MAX(salary) of tasks rows sharing the same id.
SQL: | SELECT value FROM departments AS dov
WHERE amount > (
SELECT MAX(salary) FROM tasks AS znob
WHERE znob.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "tasks",
"outer_alias": "dov",
"inner_alias": "znob",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03817 | train |
v2 | Schema:
employees (alias: bev)(status, name, type, amount)
categories(id, type, name, amount)
Task: Retrieve code from employees that have at least one corresponding entry in categories sharing the same type.
SQL: | SELECT code FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "categories",
"outer_alias": "bev",
"inner_alias": "egiv",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03818 | train |
v2 | Schema:
products (alias: nad)(type, salary, status, value)
departments(name, type, status, amount)
Task: Retrieve code from products that have at least one corresponding entry in departments sharing the same code.
SQL: | SELECT code FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.code = nad.code
); | {
"outer_table": "products",
"inner_table": "departments",
"outer_alias": "nad",
"inner_alias": "dov",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03819 | train |
v1 | Schema:
categories (alias: egiv)(id, salary, level, code)
staff(date, name, value, salary)
Task: Retrieve id from categories whose id is found in staff rows where type matches the outer record.
SQL: | SELECT id FROM categories AS egiv
WHERE id IN (
SELECT id FROM staff AS xnob
WHERE xnob.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "staff",
"outer_alias": "egiv",
"inner_alias": "xnob",
"proj_col": "id",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_03820 | train |
v1 | Schema:
invoices (alias: fal)(amount, salary, value, name)
transactions(type, status, salary, code)
Task: Retrieve salary from invoices whose status is found in transactions rows where level matches the outer record.
SQL: | SELECT salary FROM invoices AS fal
WHERE status IN (
SELECT status FROM transactions AS gev
WHERE gev.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "transactions",
"outer_alias": "fal",
"inner_alias": "gev",
"proj_col": "salary",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03821 | train |
v2 | Schema:
sales (alias: cif)(value, salary, date, name)
shipments(code, status, type, id)
Task: Find code from sales where a matching record exists in shipments with the same type.
SQL: | SELECT code FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "shipments",
"outer_alias": "cif",
"inner_alias": "vnob",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03822 | train |
v1 | Schema:
sales (alias: cif)(code, value, type, salary)
shipments(level, date, code, type)
Task: Select salary from sales where level exists in shipments for the same type.
SQL: | SELECT salary FROM sales AS cif
WHERE level IN (
SELECT level FROM shipments AS vnob
WHERE vnob.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "shipments",
"outer_alias": "cif",
"inner_alias": "vnob",
"proj_col": "salary",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03823 | train |
v1 | Schema:
tasks (alias: znob)(code, amount, level, date)
products(name, status, code, id)
Task: Find salary from tasks where id appears in products entries with matching id.
SQL: | SELECT salary FROM tasks AS znob
WHERE id IN (
SELECT id FROM products AS nad
WHERE nad.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "products",
"outer_alias": "znob",
"inner_alias": "nad",
"proj_col": "salary",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_03824 | train |
v1 | Schema:
tasks (alias: znob)(value, name, status, salary)
accounts(salary, date, code, status)
Task: Find id from tasks where status appears in accounts entries with matching type.
SQL: | SELECT id FROM tasks AS znob
WHERE status IN (
SELECT status FROM accounts AS jac
WHERE jac.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "accounts",
"outer_alias": "znob",
"inner_alias": "jac",
"proj_col": "id",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_03825 | train |
v3 | Schema:
sales (alias: cif)(type, level, status, date)
schedules(status, name, level, salary)
Task: Find name from sales where amount exceeds the average amount from schedules for the same id.
SQL: | SELECT name FROM sales AS cif
WHERE amount > (
SELECT AVG(amount) FROM schedules AS vmob
WHERE vmob.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "schedules",
"outer_alias": "cif",
"inner_alias": "vmob",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03826 | train |
v3 | Schema:
items (alias: ikob)(amount, name, id, date)
accounts(amount, code, value, date)
Task: Find id from items where amount exceeds the total salary from accounts for the same level.
SQL: | SELECT id FROM items AS ikob
WHERE amount > (
SELECT SUM(salary) FROM accounts AS jac
WHERE jac.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "accounts",
"outer_alias": "ikob",
"inner_alias": "jac",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03827 | train |
v1 | Schema:
transactions (alias: gev)(name, amount, salary, status)
regions(code, level, name, status)
Task: Retrieve id from transactions whose level is found in regions rows where type matches the outer record.
SQL: | SELECT id FROM transactions AS gev
WHERE level IN (
SELECT level FROM regions AS okiv
WHERE okiv.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "regions",
"outer_alias": "gev",
"inner_alias": "okiv",
"proj_col": "id",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03828 | train |
v2 | Schema:
sales (alias: cif)(name, status, amount, type)
transactions(status, salary, type, date)
Task: Retrieve code from sales that have at least one corresponding entry in transactions sharing the same type.
SQL: | SELECT code FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "transactions",
"outer_alias": "cif",
"inner_alias": "gev",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03829 | train |
v2 | Schema:
managers (alias: hac)(level, salary, name, value)
shipments(status, type, name, date)
Task: Find salary from managers where a matching record exists in shipments with the same code.
SQL: | SELECT salary FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "shipments",
"outer_alias": "hac",
"inner_alias": "vnob",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03830 | train |
v2 | Schema:
customers (alias: lex)(code, salary, amount, name)
regions(status, type, salary, name)
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_03831 | train |
v1 | Schema:
projects (alias: uliv)(status, value, amount, level)
managers(code, id, name, status)
Task: Select salary from projects where code exists in managers for the same level.
SQL: | SELECT salary FROM projects AS uliv
WHERE code IN (
SELECT code FROM managers AS hac
WHERE hac.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "managers",
"outer_alias": "uliv",
"inner_alias": "hac",
"proj_col": "salary",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_03832 | train |
v3 | Schema:
transactions (alias: gev)(name, type, code, amount)
orders(date, status, salary, value)
Task: Retrieve code from transactions with salary above the MIN(salary) of orders rows sharing the same code.
SQL: | SELECT code FROM transactions AS gev
WHERE salary > (
SELECT MIN(salary) FROM orders AS kab
WHERE kab.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "orders",
"outer_alias": "gev",
"inner_alias": "kab",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03833 | train |
v3 | Schema:
staff (alias: xnob)(type, id, date, code)
tasks(salary, amount, code, type)
Task: Retrieve amount from staff with value above the MAX(value) of tasks rows sharing the same type.
SQL: | SELECT amount FROM staff AS xnob
WHERE value > (
SELECT MAX(value) FROM tasks AS znob
WHERE znob.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "tasks",
"outer_alias": "xnob",
"inner_alias": "znob",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_03834 | train |
v2 | Schema:
schedules (alias: vmob)(code, amount, id, status)
products(salary, date, amount, code)
Task: Retrieve code from schedules that have at least one corresponding entry in products sharing the same status.
SQL: | SELECT code FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "products",
"outer_alias": "vmob",
"inner_alias": "nad",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_03835 | train |
v1 | Schema:
shipments (alias: vnob)(level, date, value, name)
orders(value, date, type, code)
Task: Find code from shipments where type appears in orders entries with matching level.
SQL: | SELECT code FROM shipments AS vnob
WHERE type IN (
SELECT type FROM orders AS kab
WHERE kab.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "orders",
"outer_alias": "vnob",
"inner_alias": "kab",
"proj_col": "code",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03836 | train |
v2 | Schema:
tasks (alias: znob)(id, salary, status, date)
transactions(date, name, code, salary)
Task: Retrieve amount from tasks that have at least one corresponding entry in transactions sharing the same type.
SQL: | SELECT amount FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "transactions",
"outer_alias": "znob",
"inner_alias": "gev",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_03837 | train |
v1 | Schema:
accounts (alias: jac)(name, status, level, code)
schedules(value, salary, amount, status)
Task: Retrieve name from accounts whose level is found in schedules rows where level matches the outer record.
SQL: | SELECT name FROM accounts AS jac
WHERE level IN (
SELECT level FROM schedules AS vmob
WHERE vmob.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "schedules",
"outer_alias": "jac",
"inner_alias": "vmob",
"proj_col": "name",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03838 | train |
v2 | Schema:
orders (alias: kab)(value, status, date, salary)
requests(code, value, salary, name)
Task: Retrieve amount from orders that have at least one corresponding entry in requests sharing the same type.
SQL: | SELECT amount FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "requests",
"outer_alias": "kab",
"inner_alias": "ejof",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03839 | train |
v3 | Schema:
orders (alias: kab)(value, type, name, id)
customers(amount, status, value, name)
Task: Retrieve salary from orders with amount above the COUNT(amount) of customers rows sharing the same status.
SQL: | SELECT salary FROM orders AS kab
WHERE amount > (
SELECT COUNT(amount) FROM customers AS lex
WHERE lex.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "customers",
"outer_alias": "kab",
"inner_alias": "lex",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03840 | train |
v2 | Schema:
requests (alias: ejof)(type, name, date, value)
staff(type, amount, level, value)
Task: Retrieve value from requests that have at least one corresponding entry in staff sharing the same status.
SQL: | SELECT value FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "staff",
"outer_alias": "ejof",
"inner_alias": "xnob",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_03841 | train |
v3 | Schema:
items (alias: ikob)(date, name, code, type)
regions(value, code, level, amount)
Task: Find value from items where salary exceeds the count of amount from regions for the same status.
SQL: | SELECT value FROM items AS ikob
WHERE salary > (
SELECT COUNT(amount) FROM regions AS okiv
WHERE okiv.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "regions",
"outer_alias": "ikob",
"inner_alias": "okiv",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03842 | train |
v3 | Schema:
managers (alias: hac)(date, value, status, type)
customers(salary, code, status, amount)
Task: Retrieve code from managers with value above the MAX(value) of customers rows sharing the same level.
SQL: | SELECT code FROM managers AS hac
WHERE value > (
SELECT MAX(value) FROM customers AS lex
WHERE lex.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "customers",
"outer_alias": "hac",
"inner_alias": "lex",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03843 | train |
v3 | Schema:
sales (alias: cif)(amount, date, status, value)
invoices(salary, code, date, status)
Task: Find amount from sales where amount exceeds the total value from invoices for the same type.
SQL: | SELECT amount FROM sales AS cif
WHERE amount > (
SELECT SUM(value) FROM invoices AS fal
WHERE fal.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "invoices",
"outer_alias": "cif",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03844 | train |
v1 | Schema:
categories (alias: egiv)(amount, code, date, status)
employees(value, date, id, salary)
Task: Select id from categories where id exists in employees for the same status.
SQL: | SELECT id FROM categories AS egiv
WHERE id IN (
SELECT id FROM employees AS bev
WHERE bev.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "employees",
"outer_alias": "egiv",
"inner_alias": "bev",
"proj_col": "id",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_03845 | train |
v2 | Schema:
employees (alias: bev)(id, type, value, level)
sales(level, date, type, id)
Task: Retrieve salary from employees that have at least one corresponding entry in sales sharing the same type.
SQL: | SELECT salary FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "sales",
"outer_alias": "bev",
"inner_alias": "cif",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03846 | train |
v1 | Schema:
branches (alias: agov)(amount, id, value, type)
products(code, date, name, type)
Task: Select amount from branches where level exists in products for the same status.
SQL: | SELECT amount FROM branches AS agov
WHERE level IN (
SELECT level FROM products AS nad
WHERE nad.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "products",
"outer_alias": "agov",
"inner_alias": "nad",
"proj_col": "amount",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_03847 | train |
v2 | Schema:
departments (alias: dov)(name, amount, level, date)
sales(salary, name, amount, value)
Task: Retrieve amount from departments that have at least one corresponding entry in sales sharing the same id.
SQL: | SELECT amount FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "sales",
"outer_alias": "dov",
"inner_alias": "cif",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03848 | train |
v2 | Schema:
sales (alias: cif)(level, salary, type, id)
regions(value, level, type, name)
Task: Find value from sales where a matching record exists in regions with the same level.
SQL: | SELECT value FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "regions",
"outer_alias": "cif",
"inner_alias": "okiv",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03849 | train |
v1 | Schema:
accounts (alias: jac)(status, amount, name, type)
categories(value, type, date, level)
Task: Select salary from accounts where status exists in categories for the same code.
SQL: | SELECT salary FROM accounts AS jac
WHERE status IN (
SELECT status FROM categories AS egiv
WHERE egiv.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "categories",
"outer_alias": "jac",
"inner_alias": "egiv",
"proj_col": "salary",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03850 | train |
v2 | Schema:
regions (alias: okiv)(value, status, code, date)
tasks(type, id, value, amount)
Task: Find code from regions where a matching record exists in tasks with the same level.
SQL: | SELECT code FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "tasks",
"outer_alias": "okiv",
"inner_alias": "znob",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03851 | train |
v2 | Schema:
items (alias: ikob)(name, status, type, code)
shipments(amount, code, id, status)
Task: Find code from items where a matching record exists in shipments with the same type.
SQL: | SELECT code FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "shipments",
"outer_alias": "ikob",
"inner_alias": "vnob",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03852 | train |
v3 | Schema:
transactions (alias: gev)(status, type, amount, date)
shipments(amount, type, code, value)
Task: Find amount from transactions where salary exceeds the average value from shipments for the same type.
SQL: | SELECT amount FROM transactions AS gev
WHERE salary > (
SELECT AVG(value) FROM shipments AS vnob
WHERE vnob.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "shipments",
"outer_alias": "gev",
"inner_alias": "vnob",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03853 | train |
v2 | Schema:
items (alias: ikob)(amount, name, level, id)
orders(status, name, date, level)
Task: Find salary from items where a matching record exists in orders with the same level.
SQL: | SELECT salary FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "orders",
"outer_alias": "ikob",
"inner_alias": "kab",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03854 | train |
v2 | Schema:
categories (alias: egiv)(type, status, id, amount)
products(type, status, amount, value)
Task: Retrieve salary from categories that have at least one corresponding entry in products sharing the same type.
SQL: | SELECT salary FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "products",
"outer_alias": "egiv",
"inner_alias": "nad",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_03855 | train |
v2 | Schema:
accounts (alias: jac)(code, date, id, amount)
schedules(date, amount, status, type)
Task: Retrieve code from accounts that have at least one corresponding entry in schedules sharing the same type.
SQL: | SELECT code FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "schedules",
"outer_alias": "jac",
"inner_alias": "vmob",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03856 | train |
v1 | Schema:
tasks (alias: znob)(id, type, name, amount)
transactions(name, amount, date, value)
Task: Find value from tasks where code appears in transactions entries with matching status.
SQL: | SELECT value FROM tasks AS znob
WHERE code IN (
SELECT code FROM transactions AS gev
WHERE gev.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "transactions",
"outer_alias": "znob",
"inner_alias": "gev",
"proj_col": "value",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_03857 | train |
v2 | Schema:
managers (alias: hac)(value, status, type, code)
departments(date, salary, status, amount)
Task: Retrieve value from managers that have at least one corresponding entry in departments sharing the same code.
SQL: | SELECT value FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "departments",
"outer_alias": "hac",
"inner_alias": "dov",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03858 | train |
v3 | Schema:
branches (alias: agov)(type, date, amount, status)
regions(amount, salary, code, level)
Task: Retrieve code from branches with amount above the MIN(salary) of regions rows sharing the same level.
SQL: | SELECT code FROM branches AS agov
WHERE amount > (
SELECT MIN(salary) FROM regions AS okiv
WHERE okiv.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "regions",
"outer_alias": "agov",
"inner_alias": "okiv",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_03859 | train |
v1 | Schema:
branches (alias: agov)(date, amount, level, code)
products(amount, status, id, type)
Task: Retrieve amount from branches whose status is found in products rows where id matches the outer record.
SQL: | SELECT amount FROM branches AS agov
WHERE status IN (
SELECT status FROM products AS nad
WHERE nad.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "products",
"outer_alias": "agov",
"inner_alias": "nad",
"proj_col": "amount",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_03860 | train |
v2 | Schema:
projects (alias: uliv)(id, amount, name, value)
products(type, code, salary, id)
Task: Retrieve amount from projects that have at least one corresponding entry in products sharing the same id.
SQL: | SELECT amount FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "products",
"outer_alias": "uliv",
"inner_alias": "nad",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_03861 | train |
v3 | Schema:
transactions (alias: gev)(salary, level, amount, name)
categories(level, amount, salary, code)
Task: Retrieve amount from transactions with salary above the MIN(salary) of categories rows sharing the same type.
SQL: | SELECT amount FROM transactions AS gev
WHERE salary > (
SELECT MIN(salary) FROM categories AS egiv
WHERE egiv.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "categories",
"outer_alias": "gev",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03862 | train |
v1 | Schema:
items (alias: ikob)(code, amount, name, value)
customers(id, status, name, code)
Task: Find name from items where type appears in customers entries with matching code.
SQL: | SELECT name FROM items AS ikob
WHERE type IN (
SELECT type FROM customers AS lex
WHERE lex.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "customers",
"outer_alias": "ikob",
"inner_alias": "lex",
"proj_col": "name",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03863 | train |
v2 | Schema:
accounts (alias: jac)(level, id, name, status)
departments(salary, name, level, amount)
Task: Retrieve code from accounts that have at least one corresponding entry in departments sharing the same code.
SQL: | SELECT code FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "departments",
"outer_alias": "jac",
"inner_alias": "dov",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03864 | train |
v3 | Schema:
accounts (alias: jac)(code, value, type, id)
categories(value, code, type, status)
Task: Retrieve amount from accounts with salary above the MIN(value) of categories rows sharing the same id.
SQL: | SELECT amount FROM accounts AS jac
WHERE salary > (
SELECT MIN(value) FROM categories AS egiv
WHERE egiv.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "categories",
"outer_alias": "jac",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03865 | train |
v2 | Schema:
categories (alias: egiv)(id, type, amount, date)
tasks(id, level, name, date)
Task: Retrieve name from categories that have at least one corresponding entry in tasks sharing the same id.
SQL: | SELECT name FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "tasks",
"outer_alias": "egiv",
"inner_alias": "znob",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_03866 | train |
v2 | Schema:
customers (alias: lex)(value, name, amount, id)
branches(salary, type, amount, name)
Task: Find salary from customers where a matching record exists in branches with the same status.
SQL: | SELECT salary FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "branches",
"outer_alias": "lex",
"inner_alias": "agov",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03867 | train |
v3 | Schema:
customers (alias: lex)(id, date, value, amount)
employees(level, value, amount, status)
Task: Find id from customers where value exceeds the minimum value from employees for the same status.
SQL: | SELECT id FROM customers AS lex
WHERE value > (
SELECT MIN(value) FROM employees AS bev
WHERE bev.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "employees",
"outer_alias": "lex",
"inner_alias": "bev",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03868 | train |
v3 | Schema:
shipments (alias: vnob)(level, status, name, date)
transactions(salary, amount, date, type)
Task: Retrieve value from shipments with value above the SUM(amount) of transactions rows sharing the same status.
SQL: | SELECT value FROM shipments AS vnob
WHERE value > (
SELECT SUM(amount) FROM transactions AS gev
WHERE gev.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "transactions",
"outer_alias": "vnob",
"inner_alias": "gev",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03869 | train |
v3 | Schema:
tasks (alias: znob)(salary, date, status, level)
items(salary, id, date, code)
Task: Retrieve code from tasks with amount above the AVG(amount) of items rows sharing the same level.
SQL: | SELECT code FROM tasks AS znob
WHERE amount > (
SELECT AVG(amount) FROM items AS ikob
WHERE ikob.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "items",
"outer_alias": "znob",
"inner_alias": "ikob",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_03870 | train |
v1 | Schema:
products (alias: nad)(date, type, status, code)
staff(amount, salary, date, status)
Task: Select code from products where status exists in staff for the same id.
SQL: | SELECT code FROM products AS nad
WHERE status IN (
SELECT status FROM staff AS xnob
WHERE xnob.id = nad.id
); | {
"outer_table": "products",
"inner_table": "staff",
"outer_alias": "nad",
"inner_alias": "xnob",
"proj_col": "code",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03871 | train |
v2 | Schema:
branches (alias: agov)(id, status, date, salary)
invoices(amount, salary, name, level)
Task: Find id from branches where a matching record exists in invoices with the same level.
SQL: | SELECT id FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "invoices",
"outer_alias": "agov",
"inner_alias": "fal",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_03872 | train |
v3 | Schema:
regions (alias: okiv)(code, status, id, amount)
tasks(value, type, salary, status)
Task: Find code from regions where amount exceeds the minimum salary from tasks for the same status.
SQL: | SELECT code FROM regions AS okiv
WHERE amount > (
SELECT MIN(salary) FROM tasks AS znob
WHERE znob.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "tasks",
"outer_alias": "okiv",
"inner_alias": "znob",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03873 | train |
v3 | Schema:
regions (alias: okiv)(salary, code, id, status)
categories(salary, value, date, code)
Task: Retrieve code from regions with value above the MIN(amount) of categories rows sharing the same status.
SQL: | SELECT code FROM regions AS okiv
WHERE value > (
SELECT MIN(amount) FROM categories AS egiv
WHERE egiv.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "categories",
"outer_alias": "okiv",
"inner_alias": "egiv",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03874 | train |
v1 | Schema:
projects (alias: uliv)(amount, id, code, value)
sales(salary, code, id, value)
Task: Select code from projects where status exists in sales for the same type.
SQL: | SELECT code FROM projects AS uliv
WHERE status IN (
SELECT status FROM sales AS cif
WHERE cif.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "sales",
"outer_alias": "uliv",
"inner_alias": "cif",
"proj_col": "code",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_03875 | train |
v1 | Schema:
invoices (alias: fal)(value, status, salary, type)
transactions(type, id, level, status)
Task: Retrieve salary from invoices whose id is found in transactions rows where level matches the outer record.
SQL: | SELECT salary FROM invoices AS fal
WHERE id IN (
SELECT id FROM transactions AS gev
WHERE gev.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "transactions",
"outer_alias": "fal",
"inner_alias": "gev",
"proj_col": "salary",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03876 | train |
v1 | Schema:
shipments (alias: vnob)(type, status, code, salary)
transactions(type, name, amount, id)
Task: Find name from shipments where code appears in transactions entries with matching level.
SQL: | SELECT name FROM shipments AS vnob
WHERE code IN (
SELECT code FROM transactions AS gev
WHERE gev.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "transactions",
"outer_alias": "vnob",
"inner_alias": "gev",
"proj_col": "name",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03877 | train |
v1 | Schema:
regions (alias: okiv)(id, date, type, status)
sales(id, value, amount, type)
Task: Find name from regions where type appears in sales entries with matching status.
SQL: | SELECT name FROM regions AS okiv
WHERE type IN (
SELECT type FROM sales AS cif
WHERE cif.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "sales",
"outer_alias": "okiv",
"inner_alias": "cif",
"proj_col": "name",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03878 | train |
v1 | Schema:
transactions (alias: gev)(name, code, date, status)
items(status, type, salary, id)
Task: Retrieve value from transactions whose code is found in items rows where status matches the outer record.
SQL: | SELECT value FROM transactions AS gev
WHERE code IN (
SELECT code 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": "code",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03879 | train |
v1 | Schema:
departments (alias: dov)(code, level, status, id)
requests(type, name, salary, id)
Task: Select id from departments where level exists in requests for the same status.
SQL: | SELECT id FROM departments AS dov
WHERE level IN (
SELECT level FROM requests AS ejof
WHERE ejof.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "requests",
"outer_alias": "dov",
"inner_alias": "ejof",
"proj_col": "id",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03880 | train |
v1 | Schema:
projects (alias: uliv)(code, name, amount, value)
items(status, name, salary, type)
Task: Select salary from projects where id exists in items for the same type.
SQL: | SELECT salary FROM projects AS uliv
WHERE id IN (
SELECT id FROM items AS ikob
WHERE ikob.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "items",
"outer_alias": "uliv",
"inner_alias": "ikob",
"proj_col": "salary",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_03881 | train |
v3 | Schema:
accounts (alias: jac)(type, value, id, name)
regions(level, date, salary, code)
Task: Retrieve code from accounts with salary above the COUNT(salary) of regions rows sharing the same type.
SQL: | SELECT code FROM accounts AS jac
WHERE salary > (
SELECT COUNT(salary) FROM regions AS okiv
WHERE okiv.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "regions",
"outer_alias": "jac",
"inner_alias": "okiv",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03882 | train |
v3 | Schema:
schedules (alias: vmob)(type, status, value, code)
departments(level, id, salary, type)
Task: Find id from schedules where value exceeds the minimum amount from departments for the same id.
SQL: | SELECT id FROM schedules AS vmob
WHERE value > (
SELECT MIN(amount) FROM departments AS dov
WHERE dov.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "departments",
"outer_alias": "vmob",
"inner_alias": "dov",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_03883 | train |
v1 | Schema:
products (alias: nad)(type, name, date, code)
items(status, value, type, level)
Task: Select amount from products where type exists in items for the same level.
SQL: | SELECT amount FROM products AS nad
WHERE type IN (
SELECT type FROM items AS ikob
WHERE ikob.level = nad.level
); | {
"outer_table": "products",
"inner_table": "items",
"outer_alias": "nad",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03884 | train |
v2 | Schema:
managers (alias: hac)(code, amount, date, id)
invoices(type, level, value, amount)
Task: Retrieve id from managers that have at least one corresponding entry in invoices sharing the same code.
SQL: | SELECT id FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "invoices",
"outer_alias": "hac",
"inner_alias": "fal",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03885 | train |
v1 | Schema:
departments (alias: dov)(amount, type, level, value)
categories(date, code, level, amount)
Task: Retrieve amount from departments whose type is found in categories rows where status matches the outer record.
SQL: | SELECT amount FROM departments AS dov
WHERE type IN (
SELECT type FROM categories AS egiv
WHERE egiv.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "categories",
"outer_alias": "dov",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03886 | train |
v1 | Schema:
staff (alias: xnob)(amount, status, id, type)
accounts(type, code, date, status)
Task: Select value from staff where code exists in accounts for the same status.
SQL: | SELECT value FROM staff AS xnob
WHERE code IN (
SELECT code FROM accounts AS jac
WHERE jac.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "accounts",
"outer_alias": "xnob",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_03887 | train |
v1 | Schema:
branches (alias: agov)(code, amount, id, name)
products(level, date, id, name)
Task: Retrieve amount from branches whose id is found in products rows where id matches the outer record.
SQL: | SELECT amount FROM branches AS agov
WHERE id IN (
SELECT id FROM products AS nad
WHERE nad.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "products",
"outer_alias": "agov",
"inner_alias": "nad",
"proj_col": "amount",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_03888 | train |
v3 | Schema:
products (alias: nad)(type, salary, amount, id)
projects(value, id, name, type)
Task: Retrieve amount from products with amount above the AVG(salary) of projects rows sharing the same level.
SQL: | SELECT amount FROM products AS nad
WHERE amount > (
SELECT AVG(salary) FROM projects AS uliv
WHERE uliv.level = nad.level
); | {
"outer_table": "products",
"inner_table": "projects",
"outer_alias": "nad",
"inner_alias": "uliv",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03889 | train |
v1 | Schema:
branches (alias: agov)(level, amount, value, date)
projects(status, date, level, value)
Task: Find name from branches where id appears in projects entries with matching type.
SQL: | SELECT name FROM branches AS agov
WHERE id IN (
SELECT id FROM projects AS uliv
WHERE uliv.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "projects",
"outer_alias": "agov",
"inner_alias": "uliv",
"proj_col": "name",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_03890 | train |
v3 | Schema:
departments (alias: dov)(status, id, code, amount)
items(salary, name, value, id)
Task: Retrieve code from departments with salary above the AVG(amount) of items rows sharing the same level.
SQL: | SELECT code FROM departments AS dov
WHERE salary > (
SELECT AVG(amount) FROM items AS ikob
WHERE ikob.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "items",
"outer_alias": "dov",
"inner_alias": "ikob",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03891 | train |
v2 | Schema:
tasks (alias: znob)(name, amount, date, value)
invoices(salary, id, name, code)
Task: Find amount from tasks where a matching record exists in invoices with the same status.
SQL: | SELECT amount FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "invoices",
"outer_alias": "znob",
"inner_alias": "fal",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_03892 | train |
v1 | Schema:
regions (alias: okiv)(value, amount, date, salary)
employees(level, name, date, status)
Task: Select name from regions where code exists in employees for the same code.
SQL: | SELECT name FROM regions AS okiv
WHERE code IN (
SELECT code FROM employees AS bev
WHERE bev.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "employees",
"outer_alias": "okiv",
"inner_alias": "bev",
"proj_col": "name",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03893 | train |
v3 | Schema:
orders (alias: kab)(amount, level, code, date)
shipments(level, name, amount, status)
Task: Retrieve code from orders with value above the MIN(salary) of shipments rows sharing the same id.
SQL: | SELECT code FROM orders AS kab
WHERE value > (
SELECT MIN(salary) FROM shipments AS vnob
WHERE vnob.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "shipments",
"outer_alias": "kab",
"inner_alias": "vnob",
"proj_col": "code",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03894 | train |
v3 | Schema:
shipments (alias: vnob)(code, level, date, status)
customers(level, name, code, amount)
Task: Retrieve id from shipments with amount above the MIN(amount) of customers rows sharing the same status.
SQL: | SELECT id FROM shipments AS vnob
WHERE amount > (
SELECT MIN(amount) FROM customers AS lex
WHERE lex.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "customers",
"outer_alias": "vnob",
"inner_alias": "lex",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03895 | train |
v1 | Schema:
schedules (alias: vmob)(status, id, amount, level)
items(value, id, salary, date)
Task: Select value from schedules where code exists in items for the same code.
SQL: | SELECT value FROM schedules AS vmob
WHERE code IN (
SELECT code FROM items AS ikob
WHERE ikob.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "items",
"outer_alias": "vmob",
"inner_alias": "ikob",
"proj_col": "value",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_03896 | train |
v3 | Schema:
schedules (alias: vmob)(id, value, salary, type)
categories(code, level, status, amount)
Task: Retrieve id from schedules with salary above the AVG(salary) of categories rows sharing the same type.
SQL: | SELECT id FROM schedules AS vmob
WHERE salary > (
SELECT AVG(salary) FROM categories AS egiv
WHERE egiv.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "categories",
"outer_alias": "vmob",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_03897 | train |
v1 | Schema:
products (alias: nad)(name, level, code, date)
staff(value, amount, id, salary)
Task: Find code from products where status appears in staff entries with matching id.
SQL: | SELECT code FROM products AS nad
WHERE status IN (
SELECT status FROM staff AS xnob
WHERE xnob.id = nad.id
); | {
"outer_table": "products",
"inner_table": "staff",
"outer_alias": "nad",
"inner_alias": "xnob",
"proj_col": "code",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03898 | train |
v1 | Schema:
items (alias: ikob)(value, type, amount, status)
requests(type, amount, status, date)
Task: Find salary from items where code appears in requests entries with matching id.
SQL: | SELECT salary FROM items AS ikob
WHERE code IN (
SELECT code FROM requests AS ejof
WHERE ejof.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "requests",
"outer_alias": "ikob",
"inner_alias": "ejof",
"proj_col": "salary",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03899 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.