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:
employees (alias: bev)(type, amount, status, level)
transactions(id, value, date, salary)
Task: Find code from employees where a matching record exists in transactions with the same status.
SQL: | SELECT code FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "transactions",
"outer_alias": "bev",
"inner_alias": "gev",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07800 | train |
v2 | Schema:
sales (alias: cif)(name, salary, amount, type)
accounts(status, id, level, amount)
Task: Find id from sales where a matching record exists in accounts with the same id.
SQL: | SELECT id FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "accounts",
"outer_alias": "cif",
"inner_alias": "jac",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07801 | train |
v2 | Schema:
branches (alias: agov)(level, value, salary, code)
transactions(id, salary, code, value)
Task: Find amount from branches where a matching record exists in transactions with the same code.
SQL: | SELECT amount 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": "amount",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_07802 | train |
v3 | Schema:
orders (alias: kab)(amount, id, value, date)
customers(status, id, value, level)
Task: Retrieve id from orders with value above the MAX(salary) of customers rows sharing the same id.
SQL: | SELECT id FROM orders AS kab
WHERE value > (
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": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07803 | train |
v3 | Schema:
tasks (alias: znob)(id, amount, date, salary)
invoices(id, salary, status, type)
Task: Retrieve amount from tasks with value above the SUM(salary) of invoices rows sharing the same status.
SQL: | SELECT amount FROM tasks AS znob
WHERE value > (
SELECT SUM(salary) FROM invoices AS fal
WHERE fal.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "invoices",
"outer_alias": "znob",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_07804 | train |
v2 | Schema:
accounts (alias: jac)(value, salary, date, code)
managers(date, status, level, id)
Task: Find amount from accounts where a matching record exists in managers with the same type.
SQL: | SELECT amount FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "managers",
"outer_alias": "jac",
"inner_alias": "hac",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07805 | train |
v2 | Schema:
orders (alias: kab)(type, id, level, date)
managers(code, level, salary, date)
Task: Retrieve amount from orders that have at least one corresponding entry in managers sharing the same id.
SQL: | SELECT amount FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "managers",
"outer_alias": "kab",
"inner_alias": "hac",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07806 | train |
v3 | Schema:
schedules (alias: vmob)(status, value, id, name)
categories(date, id, name, salary)
Task: Find name from schedules where value exceeds the total salary from categories for the same level.
SQL: | SELECT name FROM schedules AS vmob
WHERE value > (
SELECT SUM(salary) FROM categories AS egiv
WHERE egiv.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "categories",
"outer_alias": "vmob",
"inner_alias": "egiv",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_07807 | train |
v1 | Schema:
staff (alias: xnob)(name, salary, id, type)
sales(value, code, name, id)
Task: Select value from staff where level exists in sales for the same id.
SQL: | SELECT value FROM staff AS xnob
WHERE level IN (
SELECT level FROM sales AS cif
WHERE cif.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "sales",
"outer_alias": "xnob",
"inner_alias": "cif",
"proj_col": "value",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_07808 | train |
v1 | Schema:
branches (alias: agov)(level, date, id, name)
transactions(value, date, id, amount)
Task: Select id from branches where id exists in transactions for the same type.
SQL: | SELECT id FROM branches AS agov
WHERE id IN (
SELECT id FROM transactions AS gev
WHERE gev.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "transactions",
"outer_alias": "agov",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_07809 | train |
v1 | Schema:
projects (alias: uliv)(level, date, status, salary)
items(value, type, id, name)
Task: Retrieve name from projects whose type is found in items rows where status matches the outer record.
SQL: | SELECT name FROM projects AS uliv
WHERE type IN (
SELECT type FROM items AS ikob
WHERE ikob.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "items",
"outer_alias": "uliv",
"inner_alias": "ikob",
"proj_col": "name",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_07810 | train |
v1 | Schema:
branches (alias: agov)(date, amount, id, value)
transactions(salary, amount, status, date)
Task: Find salary from branches where id appears in transactions entries with matching code.
SQL: | SELECT salary FROM branches AS agov
WHERE id IN (
SELECT id FROM transactions AS gev
WHERE gev.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "transactions",
"outer_alias": "agov",
"inner_alias": "gev",
"proj_col": "salary",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_07811 | train |
v2 | Schema:
employees (alias: bev)(status, value, amount, id)
categories(date, amount, value, salary)
Task: Find code from employees where a matching record exists in categories with the same code.
SQL: | SELECT code FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "categories",
"outer_alias": "bev",
"inner_alias": "egiv",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07812 | train |
v3 | Schema:
products (alias: nad)(type, code, status, date)
accounts(code, value, level, date)
Task: Retrieve name from products with amount above the SUM(salary) of accounts rows sharing the same type.
SQL: | SELECT name FROM products AS nad
WHERE amount > (
SELECT SUM(salary) FROM accounts AS jac
WHERE jac.type = nad.type
); | {
"outer_table": "products",
"inner_table": "accounts",
"outer_alias": "nad",
"inner_alias": "jac",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07813 | train |
v1 | Schema:
tasks (alias: znob)(date, salary, type, status)
employees(id, date, level, name)
Task: Select code from tasks where code exists in employees for the same level.
SQL: | SELECT code FROM tasks AS znob
WHERE code IN (
SELECT code FROM employees AS bev
WHERE bev.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "employees",
"outer_alias": "znob",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_07814 | train |
v2 | Schema:
transactions (alias: gev)(name, value, code, level)
departments(amount, id, salary, code)
Task: Find id from transactions where a matching record exists in departments with the same level.
SQL: | SELECT id FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "departments",
"outer_alias": "gev",
"inner_alias": "dov",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07815 | train |
v1 | Schema:
customers (alias: lex)(type, date, id, code)
requests(status, amount, name, type)
Task: Retrieve amount from customers whose id is found in requests rows where status matches the outer record.
SQL: | SELECT amount FROM customers AS lex
WHERE id IN (
SELECT id FROM requests AS ejof
WHERE ejof.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "requests",
"outer_alias": "lex",
"inner_alias": "ejof",
"proj_col": "amount",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07816 | train |
v1 | Schema:
requests (alias: ejof)(name, date, salary, status)
managers(name, id, code, date)
Task: Select salary from requests where type exists in managers for the same type.
SQL: | SELECT salary FROM requests AS ejof
WHERE type IN (
SELECT type FROM managers AS hac
WHERE hac.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "managers",
"outer_alias": "ejof",
"inner_alias": "hac",
"proj_col": "salary",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_07817 | train |
v1 | Schema:
orders (alias: kab)(name, amount, code, salary)
departments(value, status, level, id)
Task: Retrieve name from orders whose id is found in departments rows where code matches the outer record.
SQL: | SELECT name FROM orders AS kab
WHERE id IN (
SELECT id FROM departments AS dov
WHERE dov.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "departments",
"outer_alias": "kab",
"inner_alias": "dov",
"proj_col": "name",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07818 | train |
v2 | Schema:
branches (alias: agov)(type, amount, value, date)
accounts(type, level, status, amount)
Task: Retrieve value from branches that have at least one corresponding entry in accounts sharing the same level.
SQL: | SELECT value FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "accounts",
"outer_alias": "agov",
"inner_alias": "jac",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_07819 | train |
v1 | Schema:
customers (alias: lex)(type, salary, date, status)
categories(amount, salary, level, status)
Task: Find salary from customers where level appears in categories entries with matching status.
SQL: | SELECT salary FROM customers AS lex
WHERE level IN (
SELECT level FROM categories AS egiv
WHERE egiv.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "categories",
"outer_alias": "lex",
"inner_alias": "egiv",
"proj_col": "salary",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07820 | train |
v2 | Schema:
projects (alias: uliv)(amount, status, code, name)
tasks(name, value, type, level)
Task: Retrieve amount from projects that have at least one corresponding entry in tasks sharing the same level.
SQL: | SELECT amount FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "tasks",
"outer_alias": "uliv",
"inner_alias": "znob",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_07821 | train |
v1 | Schema:
accounts (alias: jac)(type, status, amount, name)
categories(name, date, salary, status)
Task: Find name from accounts where status appears in categories entries with matching type.
SQL: | SELECT name FROM accounts AS jac
WHERE status IN (
SELECT status FROM categories AS egiv
WHERE egiv.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "categories",
"outer_alias": "jac",
"inner_alias": "egiv",
"proj_col": "name",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07822 | train |
v1 | Schema:
departments (alias: dov)(level, type, date, code)
branches(amount, code, date, level)
Task: Retrieve code from departments whose code is found in branches rows where code matches the outer record.
SQL: | SELECT code FROM departments AS dov
WHERE code IN (
SELECT code FROM branches AS agov
WHERE agov.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "branches",
"outer_alias": "dov",
"inner_alias": "agov",
"proj_col": "code",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07823 | train |
v2 | Schema:
customers (alias: lex)(level, code, id, value)
invoices(date, status, level, id)
Task: Find amount from customers where a matching record exists in invoices with the same type.
SQL: | SELECT amount FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "invoices",
"outer_alias": "lex",
"inner_alias": "fal",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07824 | train |
v2 | Schema:
accounts (alias: jac)(level, date, code, name)
departments(code, status, name, level)
Task: Retrieve salary from accounts that have at least one corresponding entry in departments sharing the same level.
SQL: | SELECT salary FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "departments",
"outer_alias": "jac",
"inner_alias": "dov",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07825 | train |
v2 | Schema:
transactions (alias: gev)(salary, status, type, date)
managers(date, type, value, amount)
Task: Find salary from transactions where a matching record exists in managers with the same type.
SQL: | SELECT salary FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "managers",
"outer_alias": "gev",
"inner_alias": "hac",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07826 | train |
v3 | Schema:
shipments (alias: vnob)(value, salary, amount, id)
regions(salary, name, status, id)
Task: Find code from shipments where amount exceeds the total amount from regions for the same type.
SQL: | SELECT code FROM shipments AS vnob
WHERE amount > (
SELECT SUM(amount) FROM regions AS okiv
WHERE okiv.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "regions",
"outer_alias": "vnob",
"inner_alias": "okiv",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_07827 | train |
v2 | Schema:
invoices (alias: fal)(value, salary, date, name)
staff(id, date, code, name)
Task: Find name from invoices where a matching record exists in staff with the same code.
SQL: | SELECT name FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "staff",
"outer_alias": "fal",
"inner_alias": "xnob",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07828 | train |
v1 | Schema:
accounts (alias: jac)(code, status, level, date)
employees(type, value, name, date)
Task: Select code from accounts where level exists in employees for the same type.
SQL: | SELECT code FROM accounts AS jac
WHERE level IN (
SELECT level FROM employees AS bev
WHERE bev.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "employees",
"outer_alias": "jac",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07829 | train |
v1 | Schema:
employees (alias: bev)(value, code, level, name)
orders(name, value, salary, level)
Task: Find name from employees where type appears in orders entries with matching status.
SQL: | SELECT name FROM employees AS bev
WHERE type IN (
SELECT type FROM orders AS kab
WHERE kab.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "orders",
"outer_alias": "bev",
"inner_alias": "kab",
"proj_col": "name",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07830 | train |
v3 | Schema:
products (alias: nad)(type, status, amount, code)
customers(code, value, level, status)
Task: Retrieve amount from products with value above the MAX(amount) of customers rows sharing the same status.
SQL: | SELECT amount FROM products AS nad
WHERE value > (
SELECT MAX(amount) FROM customers AS lex
WHERE lex.status = nad.status
); | {
"outer_table": "products",
"inner_table": "customers",
"outer_alias": "nad",
"inner_alias": "lex",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07831 | train |
v1 | Schema:
tasks (alias: znob)(value, salary, date, id)
accounts(salary, code, id, name)
Task: Find salary from tasks where level appears in accounts entries with matching status.
SQL: | SELECT salary FROM tasks AS znob
WHERE level IN (
SELECT level 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": "level",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_07832 | train |
v2 | Schema:
customers (alias: lex)(id, type, amount, status)
employees(type, status, id, name)
Task: Retrieve value from customers that have at least one corresponding entry in employees sharing the same code.
SQL: | SELECT value FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "employees",
"outer_alias": "lex",
"inner_alias": "bev",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07833 | train |
v2 | Schema:
sales (alias: cif)(level, value, amount, status)
regions(name, date, id, type)
Task: Find name from sales where a matching record exists in regions with the same id.
SQL: | SELECT name FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "regions",
"outer_alias": "cif",
"inner_alias": "okiv",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07834 | train |
v1 | Schema:
managers (alias: hac)(salary, code, name, amount)
sales(date, amount, value, salary)
Task: Find amount from managers where level appears in sales entries with matching id.
SQL: | SELECT amount FROM managers AS hac
WHERE level IN (
SELECT level FROM sales AS cif
WHERE cif.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "sales",
"outer_alias": "hac",
"inner_alias": "cif",
"proj_col": "amount",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07835 | train |
v3 | Schema:
shipments (alias: vnob)(type, salary, code, name)
categories(type, name, level, status)
Task: Find code from shipments where salary exceeds the minimum value from categories for the same type.
SQL: | SELECT code FROM shipments AS vnob
WHERE salary > (
SELECT MIN(value) FROM categories AS egiv
WHERE egiv.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "categories",
"outer_alias": "vnob",
"inner_alias": "egiv",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_07836 | train |
v3 | Schema:
schedules (alias: vmob)(name, status, level, date)
managers(type, name, salary, id)
Task: Find salary from schedules where salary exceeds the total value from managers for the same status.
SQL: | SELECT salary FROM schedules AS vmob
WHERE salary > (
SELECT SUM(value) FROM managers AS hac
WHERE hac.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "managers",
"outer_alias": "vmob",
"inner_alias": "hac",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_07837 | train |
v2 | Schema:
customers (alias: lex)(type, name, level, value)
items(value, date, level, code)
Task: Find id from customers where a matching record exists in items with the same type.
SQL: | SELECT id FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "items",
"outer_alias": "lex",
"inner_alias": "ikob",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07838 | train |
v3 | Schema:
staff (alias: xnob)(status, salary, id, type)
tasks(type, id, amount, name)
Task: Retrieve amount from staff with salary above the MAX(salary) of tasks rows sharing the same status.
SQL: | SELECT amount FROM staff AS xnob
WHERE salary > (
SELECT MAX(salary) FROM tasks AS znob
WHERE znob.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "tasks",
"outer_alias": "xnob",
"inner_alias": "znob",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_07839 | train |
v2 | Schema:
branches (alias: agov)(status, id, code, name)
items(salary, date, type, status)
Task: Retrieve code from branches that have at least one corresponding entry in items sharing the same id.
SQL: | SELECT code FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "items",
"outer_alias": "agov",
"inner_alias": "ikob",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_07840 | train |
v2 | Schema:
staff (alias: xnob)(salary, value, level, name)
accounts(value, status, type, name)
Task: Retrieve code from staff that have at least one corresponding entry in accounts sharing the same id.
SQL: | SELECT code FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "accounts",
"outer_alias": "xnob",
"inner_alias": "jac",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_07841 | train |
v2 | Schema:
regions (alias: okiv)(amount, date, status, salary)
requests(amount, code, salary, date)
Task: Retrieve code from regions that have at least one corresponding entry in requests sharing the same type.
SQL: | SELECT code FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "requests",
"outer_alias": "okiv",
"inner_alias": "ejof",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_07842 | train |
v3 | Schema:
managers (alias: hac)(amount, name, id, code)
accounts(name, date, status, level)
Task: Find id from managers where value exceeds the total salary from accounts for the same id.
SQL: | SELECT id FROM managers AS hac
WHERE value > (
SELECT SUM(salary) FROM accounts AS jac
WHERE jac.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "accounts",
"outer_alias": "hac",
"inner_alias": "jac",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07843 | train |
v2 | Schema:
transactions (alias: gev)(name, value, salary, code)
items(id, name, status, code)
Task: Find salary from transactions where a matching record exists in items with the same code.
SQL: | SELECT salary FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "items",
"outer_alias": "gev",
"inner_alias": "ikob",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07844 | train |
v1 | Schema:
regions (alias: okiv)(salary, amount, id, level)
employees(salary, amount, id, date)
Task: Select value from regions where level exists in employees for the same level.
SQL: | SELECT value FROM regions AS okiv
WHERE level IN (
SELECT level FROM employees AS bev
WHERE bev.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "employees",
"outer_alias": "okiv",
"inner_alias": "bev",
"proj_col": "value",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_07845 | train |
v1 | Schema:
transactions (alias: gev)(name, id, level, code)
items(code, salary, type, name)
Task: Retrieve code from transactions whose id is found in items rows where level matches the outer record.
SQL: | SELECT code FROM transactions AS gev
WHERE id IN (
SELECT id FROM items AS ikob
WHERE ikob.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "items",
"outer_alias": "gev",
"inner_alias": "ikob",
"proj_col": "code",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07846 | train |
v1 | Schema:
staff (alias: xnob)(code, value, salary, amount)
employees(name, level, code, date)
Task: Find id from staff where type appears in employees entries with matching type.
SQL: | SELECT id FROM staff AS xnob
WHERE type IN (
SELECT type FROM employees AS bev
WHERE bev.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "employees",
"outer_alias": "xnob",
"inner_alias": "bev",
"proj_col": "id",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_07847 | train |
v1 | Schema:
shipments (alias: vnob)(id, type, level, date)
accounts(level, type, id, amount)
Task: Retrieve salary from shipments whose level is found in accounts rows where status matches the outer record.
SQL: | SELECT salary FROM shipments AS vnob
WHERE level IN (
SELECT level FROM accounts AS jac
WHERE jac.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "accounts",
"outer_alias": "vnob",
"inner_alias": "jac",
"proj_col": "salary",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_07848 | train |
v3 | Schema:
orders (alias: kab)(code, level, salary, id)
branches(value, type, amount, salary)
Task: Retrieve value from orders with value above the COUNT(amount) of branches rows sharing the same level.
SQL: | SELECT value FROM orders AS kab
WHERE value > (
SELECT COUNT(amount) FROM branches AS agov
WHERE agov.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "branches",
"outer_alias": "kab",
"inner_alias": "agov",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07849 | train |
v2 | Schema:
transactions (alias: gev)(status, date, type, name)
requests(type, date, level, id)
Task: Retrieve code from transactions that have at least one corresponding entry in requests sharing the same level.
SQL: | SELECT code FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "requests",
"outer_alias": "gev",
"inner_alias": "ejof",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07850 | train |
v2 | Schema:
shipments (alias: vnob)(value, id, status, code)
employees(id, amount, level, type)
Task: Retrieve id from shipments that have at least one corresponding entry in employees sharing the same code.
SQL: | SELECT id FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "employees",
"outer_alias": "vnob",
"inner_alias": "bev",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_07851 | train |
v2 | Schema:
invoices (alias: fal)(type, status, value, code)
tasks(value, amount, name, level)
Task: Find code from invoices where a matching record exists in tasks with the same type.
SQL: | SELECT code FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "tasks",
"outer_alias": "fal",
"inner_alias": "znob",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07852 | train |
v1 | Schema:
customers (alias: lex)(amount, date, type, salary)
invoices(amount, value, name, status)
Task: Select id from customers where level exists in invoices for the same level.
SQL: | SELECT id FROM customers AS lex
WHERE level IN (
SELECT level FROM invoices AS fal
WHERE fal.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "invoices",
"outer_alias": "lex",
"inner_alias": "fal",
"proj_col": "id",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07853 | train |
v2 | Schema:
branches (alias: agov)(id, name, code, salary)
tasks(level, type, id, name)
Task: Retrieve amount from branches that have at least one corresponding entry in tasks sharing the same status.
SQL: | SELECT amount 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": "amount",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_07854 | train |
v2 | Schema:
orders (alias: kab)(date, status, level, type)
managers(status, salary, name, value)
Task: Find amount from orders where a matching record exists in managers with the same level.
SQL: | SELECT amount FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "managers",
"outer_alias": "kab",
"inner_alias": "hac",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07855 | train |
v3 | Schema:
shipments (alias: vnob)(name, type, code, value)
employees(code, level, value, id)
Task: Retrieve code from shipments with salary above the AVG(salary) of employees rows sharing the same status.
SQL: | SELECT code FROM shipments AS vnob
WHERE salary > (
SELECT AVG(salary) FROM employees AS bev
WHERE bev.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "employees",
"outer_alias": "vnob",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_07856 | train |
v1 | Schema:
transactions (alias: gev)(salary, type, date, name)
projects(code, date, value, salary)
Task: Retrieve code from transactions whose code is found in projects rows where status matches the outer record.
SQL: | SELECT code FROM transactions AS gev
WHERE code IN (
SELECT code FROM projects AS uliv
WHERE uliv.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "projects",
"outer_alias": "gev",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07857 | train |
v3 | Schema:
products (alias: nad)(id, status, type, amount)
transactions(code, type, date, status)
Task: Retrieve salary from products with amount above the AVG(salary) of transactions rows sharing the same id.
SQL: | SELECT salary FROM products AS nad
WHERE amount > (
SELECT AVG(salary) FROM transactions AS gev
WHERE gev.id = nad.id
); | {
"outer_table": "products",
"inner_table": "transactions",
"outer_alias": "nad",
"inner_alias": "gev",
"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_07858 | train |
v3 | Schema:
transactions (alias: gev)(id, status, value, level)
tasks(type, value, date, level)
Task: Find value from transactions where value exceeds the total salary from tasks for the same level.
SQL: | SELECT value FROM transactions AS gev
WHERE value > (
SELECT SUM(salary) FROM tasks AS znob
WHERE znob.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "tasks",
"outer_alias": "gev",
"inner_alias": "znob",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07859 | train |
v2 | Schema:
departments (alias: dov)(code, type, name, date)
managers(status, name, type, salary)
Task: Retrieve code from departments that have at least one corresponding entry in managers sharing the same id.
SQL: | SELECT code FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "managers",
"outer_alias": "dov",
"inner_alias": "hac",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07860 | train |
v2 | Schema:
items (alias: ikob)(status, salary, date, amount)
schedules(id, value, salary, amount)
Task: Find code from items where a matching record exists in schedules with the same id.
SQL: | SELECT code FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "schedules",
"outer_alias": "ikob",
"inner_alias": "vmob",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_07861 | train |
v1 | Schema:
regions (alias: okiv)(status, amount, date, value)
invoices(value, date, type, salary)
Task: Select id from regions where level exists in invoices for the same type.
SQL: | SELECT id FROM regions AS okiv
WHERE level IN (
SELECT level FROM invoices AS fal
WHERE fal.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "invoices",
"outer_alias": "okiv",
"inner_alias": "fal",
"proj_col": "id",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_07862 | train |
v2 | Schema:
employees (alias: bev)(id, code, name, type)
shipments(salary, amount, value, name)
Task: Retrieve code from employees that have at least one corresponding entry in shipments sharing the same level.
SQL: | SELECT code FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "shipments",
"outer_alias": "bev",
"inner_alias": "vnob",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07863 | train |
v1 | Schema:
projects (alias: uliv)(salary, type, level, amount)
transactions(amount, id, salary, type)
Task: Select amount from projects where level exists in transactions for the same id.
SQL: | SELECT amount FROM projects AS uliv
WHERE level IN (
SELECT level FROM transactions AS gev
WHERE gev.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "transactions",
"outer_alias": "uliv",
"inner_alias": "gev",
"proj_col": "amount",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_07864 | train |
v1 | Schema:
products (alias: nad)(status, salary, value, date)
requests(amount, name, date, id)
Task: Find amount from products where level appears in requests entries with matching level.
SQL: | SELECT amount FROM products AS nad
WHERE level IN (
SELECT level FROM requests AS ejof
WHERE ejof.level = nad.level
); | {
"outer_table": "products",
"inner_table": "requests",
"outer_alias": "nad",
"inner_alias": "ejof",
"proj_col": "amount",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07865 | train |
v3 | Schema:
employees (alias: bev)(status, date, type, code)
orders(name, date, level, status)
Task: Retrieve name from employees with salary above the COUNT(value) of orders rows sharing the same type.
SQL: | SELECT name FROM employees AS bev
WHERE salary > (
SELECT COUNT(value) FROM orders AS kab
WHERE kab.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "orders",
"outer_alias": "bev",
"inner_alias": "kab",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07866 | train |
v1 | Schema:
requests (alias: ejof)(amount, value, code, status)
tasks(name, id, date, type)
Task: Retrieve name from requests whose status is found in tasks rows where level matches the outer record.
SQL: | SELECT name FROM requests AS ejof
WHERE status IN (
SELECT status FROM tasks AS znob
WHERE znob.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "tasks",
"outer_alias": "ejof",
"inner_alias": "znob",
"proj_col": "name",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_07867 | train |
v2 | Schema:
customers (alias: lex)(amount, value, name, status)
shipments(status, amount, date, code)
Task: Retrieve code from customers that have at least one corresponding entry in shipments sharing the same code.
SQL: | SELECT code FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "shipments",
"outer_alias": "lex",
"inner_alias": "vnob",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07868 | train |
v1 | Schema:
accounts (alias: jac)(date, value, status, amount)
managers(amount, name, id, salary)
Task: Retrieve value from accounts whose code is found in managers rows where type matches the outer record.
SQL: | SELECT value FROM accounts AS jac
WHERE code IN (
SELECT code FROM managers AS hac
WHERE hac.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "managers",
"outer_alias": "jac",
"inner_alias": "hac",
"proj_col": "value",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07869 | train |
v2 | Schema:
employees (alias: bev)(name, value, id, amount)
projects(type, salary, level, date)
Task: Retrieve code from employees that have at least one corresponding entry in projects sharing the same id.
SQL: | SELECT code FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "projects",
"outer_alias": "bev",
"inner_alias": "uliv",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07870 | train |
v1 | Schema:
tasks (alias: znob)(salary, name, code, level)
accounts(name, type, salary, status)
Task: Retrieve value from tasks whose id is found in accounts rows where level matches the outer record.
SQL: | SELECT value FROM tasks AS znob
WHERE id IN (
SELECT id FROM accounts AS jac
WHERE jac.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "accounts",
"outer_alias": "znob",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_07871 | train |
v3 | Schema:
products (alias: nad)(amount, date, salary, value)
employees(amount, date, type, code)
Task: Find name from products where value exceeds the total salary from employees for the same level.
SQL: | SELECT name FROM products AS nad
WHERE value > (
SELECT SUM(salary) FROM employees AS bev
WHERE bev.level = nad.level
); | {
"outer_table": "products",
"inner_table": "employees",
"outer_alias": "nad",
"inner_alias": "bev",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07872 | train |
v1 | Schema:
branches (alias: agov)(amount, id, value, type)
products(value, amount, id, status)
Task: Retrieve value from branches whose status is found in products rows where level matches the outer record.
SQL: | SELECT value FROM branches AS agov
WHERE status IN (
SELECT status FROM products AS nad
WHERE nad.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "products",
"outer_alias": "agov",
"inner_alias": "nad",
"proj_col": "value",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_07873 | train |
v1 | Schema:
orders (alias: kab)(name, amount, code, status)
schedules(status, amount, value, name)
Task: Find code from orders where code appears in schedules entries with matching level.
SQL: | SELECT code FROM orders AS kab
WHERE code IN (
SELECT code FROM schedules AS vmob
WHERE vmob.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "schedules",
"outer_alias": "kab",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07874 | train |
v1 | Schema:
shipments (alias: vnob)(value, status, date, type)
staff(name, amount, salary, status)
Task: Find id from shipments where id appears in staff entries with matching status.
SQL: | SELECT id FROM shipments AS vnob
WHERE id IN (
SELECT id FROM staff AS xnob
WHERE xnob.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "staff",
"outer_alias": "vnob",
"inner_alias": "xnob",
"proj_col": "id",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_07875 | train |
v2 | Schema:
accounts (alias: jac)(value, salary, id, amount)
branches(type, value, amount, salary)
Task: Retrieve salary from accounts that have at least one corresponding entry in branches sharing the same status.
SQL: | SELECT salary FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "branches",
"outer_alias": "jac",
"inner_alias": "agov",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07876 | train |
v2 | Schema:
invoices (alias: fal)(amount, level, salary, code)
schedules(date, type, value, id)
Task: Retrieve name from invoices that have at least one corresponding entry in schedules sharing the same status.
SQL: | SELECT name FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "schedules",
"outer_alias": "fal",
"inner_alias": "vmob",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07877 | train |
v2 | Schema:
regions (alias: okiv)(amount, level, date, name)
customers(name, amount, value, level)
Task: Find amount from regions where a matching record exists in customers with the same id.
SQL: | SELECT amount FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "customers",
"outer_alias": "okiv",
"inner_alias": "lex",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_07878 | train |
v1 | Schema:
customers (alias: lex)(type, value, name, code)
sales(salary, amount, status, code)
Task: Retrieve value from customers whose level is found in sales rows where status matches the outer record.
SQL: | SELECT value FROM customers AS lex
WHERE level IN (
SELECT level FROM sales AS cif
WHERE cif.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "sales",
"outer_alias": "lex",
"inner_alias": "cif",
"proj_col": "value",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07879 | train |
v1 | Schema:
schedules (alias: vmob)(salary, level, amount, date)
employees(salary, status, amount, value)
Task: Retrieve name from schedules whose status is found in employees rows where type matches the outer record.
SQL: | SELECT name FROM schedules AS vmob
WHERE status IN (
SELECT status FROM employees AS bev
WHERE bev.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "employees",
"outer_alias": "vmob",
"inner_alias": "bev",
"proj_col": "name",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_07880 | train |
v2 | Schema:
regions (alias: okiv)(value, type, level, salary)
products(value, salary, date, id)
Task: Find amount from regions where a matching record exists in products with the same status.
SQL: | SELECT amount FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "products",
"outer_alias": "okiv",
"inner_alias": "nad",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_07881 | train |
v1 | Schema:
staff (alias: xnob)(status, level, date, name)
managers(code, date, salary, value)
Task: Find salary from staff where code appears in managers entries with matching id.
SQL: | SELECT salary FROM staff AS xnob
WHERE code IN (
SELECT code FROM managers AS hac
WHERE hac.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "managers",
"outer_alias": "xnob",
"inner_alias": "hac",
"proj_col": "salary",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_07882 | train |
v2 | Schema:
departments (alias: dov)(level, status, id, date)
orders(date, type, status, code)
Task: Find value from departments where a matching record exists in orders with the same type.
SQL: | SELECT value FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "orders",
"outer_alias": "dov",
"inner_alias": "kab",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07883 | train |
v3 | Schema:
sales (alias: cif)(status, level, amount, salary)
requests(salary, name, type, level)
Task: Find id from sales where amount exceeds the count of salary from requests for the same code.
SQL: | SELECT id FROM sales AS cif
WHERE amount > (
SELECT COUNT(salary) FROM requests AS ejof
WHERE ejof.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "requests",
"outer_alias": "cif",
"inner_alias": "ejof",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07884 | train |
v3 | Schema:
branches (alias: agov)(type, salary, date, code)
staff(date, salary, amount, status)
Task: Retrieve amount from branches with amount above the MIN(amount) of staff rows sharing the same id.
SQL: | SELECT amount FROM branches AS agov
WHERE amount > (
SELECT MIN(amount) FROM staff AS xnob
WHERE xnob.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "staff",
"outer_alias": "agov",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_07885 | train |
v1 | Schema:
tasks (alias: znob)(name, type, status, amount)
staff(type, code, amount, level)
Task: Retrieve amount from tasks whose status is found in staff rows where level matches the outer record.
SQL: | SELECT amount FROM tasks AS znob
WHERE status IN (
SELECT status FROM staff AS xnob
WHERE xnob.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "staff",
"outer_alias": "znob",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_07886 | train |
v3 | Schema:
customers (alias: lex)(level, status, id, amount)
orders(amount, date, value, status)
Task: Find salary from customers where salary exceeds the count of value from orders for the same id.
SQL: | SELECT salary FROM customers AS lex
WHERE salary > (
SELECT COUNT(value) FROM orders AS kab
WHERE kab.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "orders",
"outer_alias": "lex",
"inner_alias": "kab",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07887 | train |
v2 | Schema:
items (alias: ikob)(level, status, code, value)
schedules(salary, value, level, id)
Task: Retrieve id from items that have at least one corresponding entry in schedules sharing the same status.
SQL: | SELECT id FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "schedules",
"outer_alias": "ikob",
"inner_alias": "vmob",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_07888 | train |
v1 | Schema:
customers (alias: lex)(amount, level, status, code)
schedules(id, value, code, status)
Task: Find amount from customers where code appears in schedules entries with matching status.
SQL: | SELECT amount FROM customers AS lex
WHERE code IN (
SELECT code FROM schedules AS vmob
WHERE vmob.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "schedules",
"outer_alias": "lex",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07889 | train |
v2 | Schema:
branches (alias: agov)(status, level, date, amount)
staff(value, id, date, amount)
Task: Retrieve salary from branches that have at least one corresponding entry in staff sharing the same level.
SQL: | SELECT salary FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "staff",
"outer_alias": "agov",
"inner_alias": "xnob",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_07890 | train |
v2 | Schema:
items (alias: ikob)(level, date, amount, name)
customers(id, date, level, value)
Task: Retrieve name from items that have at least one corresponding entry in customers sharing the same status.
SQL: | SELECT name FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "customers",
"outer_alias": "ikob",
"inner_alias": "lex",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_07891 | train |
v3 | Schema:
customers (alias: lex)(date, type, salary, code)
requests(code, date, name, amount)
Task: Retrieve amount from customers with amount above the MIN(amount) of requests rows sharing the same code.
SQL: | SELECT amount FROM customers AS lex
WHERE amount > (
SELECT MIN(amount) FROM requests AS ejof
WHERE ejof.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "requests",
"outer_alias": "lex",
"inner_alias": "ejof",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07892 | train |
v2 | Schema:
tasks (alias: znob)(status, amount, date, salary)
orders(name, id, amount, level)
Task: Retrieve code from tasks that have at least one corresponding entry in orders sharing the same id.
SQL: | SELECT code FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "orders",
"outer_alias": "znob",
"inner_alias": "kab",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_07893 | train |
v2 | Schema:
departments (alias: dov)(code, name, value, type)
projects(amount, type, name, salary)
Task: Retrieve name from departments that have at least one corresponding entry in projects sharing the same type.
SQL: | SELECT name FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "projects",
"outer_alias": "dov",
"inner_alias": "uliv",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07894 | train |
v1 | Schema:
transactions (alias: gev)(name, level, code, salary)
regions(amount, name, code, date)
Task: Retrieve code from transactions whose code is found in regions rows where type matches the outer record.
SQL: | SELECT code FROM transactions AS gev
WHERE code IN (
SELECT code FROM regions AS okiv
WHERE okiv.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "regions",
"outer_alias": "gev",
"inner_alias": "okiv",
"proj_col": "code",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07895 | train |
v3 | Schema:
invoices (alias: fal)(amount, name, salary, status)
requests(value, status, date, id)
Task: Find code from invoices where value exceeds the count of value from requests for the same id.
SQL: | SELECT code FROM invoices AS fal
WHERE value > (
SELECT COUNT(value) FROM requests AS ejof
WHERE ejof.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "requests",
"outer_alias": "fal",
"inner_alias": "ejof",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07896 | train |
v1 | Schema:
products (alias: nad)(type, status, value, date)
managers(level, value, name, salary)
Task: Find salary from products where status appears in managers entries with matching level.
SQL: | SELECT salary FROM products AS nad
WHERE status IN (
SELECT status FROM managers AS hac
WHERE hac.level = nad.level
); | {
"outer_table": "products",
"inner_table": "managers",
"outer_alias": "nad",
"inner_alias": "hac",
"proj_col": "salary",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07897 | train |
v1 | Schema:
invoices (alias: fal)(name, date, code, salary)
regions(value, code, salary, id)
Task: Select amount from invoices where code exists in regions for the same code.
SQL: | SELECT amount FROM invoices AS fal
WHERE code IN (
SELECT code FROM regions AS okiv
WHERE okiv.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "regions",
"outer_alias": "fal",
"inner_alias": "okiv",
"proj_col": "amount",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07898 | train |
v3 | Schema:
invoices (alias: fal)(value, salary, status, date)
shipments(date, level, salary, id)
Task: Find code from invoices where amount exceeds the count of salary from shipments for the same code.
SQL: | SELECT code FROM invoices AS fal
WHERE amount > (
SELECT COUNT(salary) FROM shipments AS vnob
WHERE vnob.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "shipments",
"outer_alias": "fal",
"inner_alias": "vnob",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07899 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.