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)(status, code, date, value)
branches(salary, value, status, type)
Task: Find code from employees where a matching record exists in branches with the same type.
SQL: | SELECT code FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "branches",
"outer_alias": "bev",
"inner_alias": "agov",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00000 | train |
v1 | Schema:
customers (alias: lex)(name, id, salary, level)
projects(date, status, name, code)
Task: Retrieve code from customers whose code is found in projects rows where type matches the outer record.
SQL: | SELECT code FROM customers AS lex
WHERE code IN (
SELECT code FROM projects AS uliv
WHERE uliv.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "projects",
"outer_alias": "lex",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00001 | train |
v3 | Schema:
requests (alias: ejof)(amount, code, level, salary)
staff(type, salary, id, amount)
Task: Retrieve value from requests with value above the MIN(amount) of staff rows sharing the same id.
SQL: | SELECT value FROM requests AS ejof
WHERE value > (
SELECT MIN(amount) FROM staff AS xnob
WHERE xnob.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "staff",
"outer_alias": "ejof",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_00002 | train |
v2 | Schema:
products (alias: nad)(name, status, value, salary)
sales(id, date, value, code)
Task: Retrieve salary from products that have at least one corresponding entry in sales sharing the same level.
SQL: | SELECT salary FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.level = nad.level
); | {
"outer_table": "products",
"inner_table": "sales",
"outer_alias": "nad",
"inner_alias": "cif",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00003 | train |
v1 | Schema:
orders (alias: kab)(value, type, code, date)
schedules(name, amount, status, salary)
Task: Retrieve code from orders whose code is found in schedules rows where status matches the outer record.
SQL: | SELECT code FROM orders AS kab
WHERE code IN (
SELECT code FROM schedules AS vmob
WHERE vmob.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "schedules",
"outer_alias": "kab",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00004 | train |
v3 | Schema:
projects (alias: uliv)(salary, amount, type, value)
schedules(name, value, salary, code)
Task: Find amount from projects where amount exceeds the average salary from schedules for the same code.
SQL: | SELECT amount FROM projects AS uliv
WHERE amount > (
SELECT AVG(salary) FROM schedules AS vmob
WHERE vmob.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "schedules",
"outer_alias": "uliv",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_00005 | train |
v2 | Schema:
sales (alias: cif)(level, name, status, value)
transactions(level, salary, date, status)
Task: Find salary from sales where a matching record exists in transactions with the same type.
SQL: | SELECT salary 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": "salary",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00006 | train |
v2 | Schema:
shipments (alias: vnob)(level, amount, salary, code)
sales(date, name, amount, type)
Task: Retrieve id from shipments that have at least one corresponding entry in sales sharing the same code.
SQL: | SELECT id FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "sales",
"outer_alias": "vnob",
"inner_alias": "cif",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_00007 | train |
v2 | Schema:
orders (alias: kab)(value, type, code, status)
shipments(code, id, name, type)
Task: Find value from orders where a matching record exists in shipments with the same type.
SQL: | SELECT value FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "shipments",
"outer_alias": "kab",
"inner_alias": "vnob",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00008 | train |
v3 | Schema:
categories (alias: egiv)(date, id, level, amount)
accounts(value, code, amount, type)
Task: Retrieve salary from categories with salary above the MAX(value) of accounts rows sharing the same code.
SQL: | SELECT salary FROM categories AS egiv
WHERE salary > (
SELECT MAX(value) FROM accounts AS jac
WHERE jac.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "accounts",
"outer_alias": "egiv",
"inner_alias": "jac",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_00009 | train |
v1 | Schema:
transactions (alias: gev)(name, value, amount, status)
customers(type, id, status, date)
Task: Find value from transactions where status appears in customers entries with matching id.
SQL: | SELECT value FROM transactions AS gev
WHERE status IN (
SELECT status FROM customers AS lex
WHERE lex.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "customers",
"outer_alias": "gev",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00010 | train |
v3 | Schema:
employees (alias: bev)(type, salary, amount, status)
tasks(value, type, id, code)
Task: Retrieve salary from employees with salary above the AVG(amount) of tasks rows sharing the same level.
SQL: | SELECT salary FROM employees AS bev
WHERE salary > (
SELECT AVG(amount) FROM tasks AS znob
WHERE znob.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "tasks",
"outer_alias": "bev",
"inner_alias": "znob",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00011 | train |
v2 | Schema:
regions (alias: okiv)(type, amount, date, name)
shipments(date, id, amount, value)
Task: Retrieve amount from regions that have at least one corresponding entry in shipments sharing the same id.
SQL: | SELECT amount FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "shipments",
"outer_alias": "okiv",
"inner_alias": "vnob",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_00012 | train |
v1 | Schema:
items (alias: ikob)(level, id, code, salary)
transactions(value, name, type, salary)
Task: Find salary from items where level appears in transactions entries with matching status.
SQL: | SELECT salary FROM items AS ikob
WHERE level IN (
SELECT level FROM transactions AS gev
WHERE gev.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "transactions",
"outer_alias": "ikob",
"inner_alias": "gev",
"proj_col": "salary",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_00013 | train |
v1 | Schema:
departments (alias: dov)(type, level, amount, status)
categories(level, type, date, status)
Task: Find value from departments where level appears in categories entries with matching level.
SQL: | SELECT value FROM departments AS dov
WHERE level IN (
SELECT level FROM categories AS egiv
WHERE egiv.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "categories",
"outer_alias": "dov",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00014 | train |
v2 | Schema:
invoices (alias: fal)(salary, amount, level, id)
customers(amount, date, name, value)
Task: Retrieve name from invoices that have at least one corresponding entry in customers sharing the same level.
SQL: | SELECT name FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "customers",
"outer_alias": "fal",
"inner_alias": "lex",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00015 | train |
v2 | Schema:
branches (alias: agov)(level, value, code, status)
transactions(level, date, name, code)
Task: Retrieve name from branches that have at least one corresponding entry in transactions sharing the same code.
SQL: | SELECT name 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": "name",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_00016 | train |
v3 | Schema:
staff (alias: xnob)(value, status, salary, type)
managers(code, type, level, name)
Task: Retrieve name from staff with value above the MAX(amount) of managers rows sharing the same level.
SQL: | SELECT name FROM staff AS xnob
WHERE value > (
SELECT MAX(amount) FROM managers AS hac
WHERE hac.level = xnob.level
); | {
"outer_table": "staff",
"inner_table": "managers",
"outer_alias": "xnob",
"inner_alias": "hac",
"proj_col": "name",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "xnob.level",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_00017 | train |
v2 | Schema:
categories (alias: egiv)(type, value, salary, level)
accounts(amount, value, status, id)
Task: Find amount from categories where a matching record exists in accounts with the same type.
SQL: | SELECT amount FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "accounts",
"outer_alias": "egiv",
"inner_alias": "jac",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_00018 | train |
v2 | Schema:
employees (alias: bev)(type, value, date, name)
requests(id, type, salary, level)
Task: Retrieve id from employees that have at least one corresponding entry in requests sharing the same status.
SQL: | SELECT id FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "requests",
"outer_alias": "bev",
"inner_alias": "ejof",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00019 | train |
v2 | Schema:
shipments (alias: vnob)(id, salary, name, amount)
transactions(type, salary, status, amount)
Task: Find name from shipments where a matching record exists in transactions with the same status.
SQL: | SELECT name FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "transactions",
"outer_alias": "vnob",
"inner_alias": "gev",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_00020 | train |
v1 | Schema:
sales (alias: cif)(date, code, id, value)
managers(type, salary, name, date)
Task: Select id from sales where level exists in managers for the same code.
SQL: | SELECT id FROM sales AS cif
WHERE level IN (
SELECT level FROM managers AS hac
WHERE hac.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "managers",
"outer_alias": "cif",
"inner_alias": "hac",
"proj_col": "id",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00021 | train |
v3 | Schema:
staff (alias: xnob)(level, type, status, name)
regions(level, code, amount, date)
Task: Find code from staff where value exceeds the count of amount from regions for the same id.
SQL: | SELECT code FROM staff AS xnob
WHERE value > (
SELECT COUNT(amount) FROM regions AS okiv
WHERE okiv.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "regions",
"outer_alias": "xnob",
"inner_alias": "okiv",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_00022 | train |
v3 | Schema:
managers (alias: hac)(level, name, date, amount)
branches(date, status, salary, type)
Task: Retrieve code from managers with amount above the MIN(amount) of branches rows sharing the same type.
SQL: | SELECT code FROM managers AS hac
WHERE amount > (
SELECT MIN(amount) FROM branches AS agov
WHERE agov.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "branches",
"outer_alias": "hac",
"inner_alias": "agov",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00023 | train |
v3 | Schema:
staff (alias: xnob)(id, salary, amount, date)
schedules(id, type, amount, salary)
Task: Find amount from staff where salary exceeds the maximum value from schedules for the same code.
SQL: | SELECT amount FROM staff AS xnob
WHERE salary > (
SELECT MAX(value) FROM schedules AS vmob
WHERE vmob.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "schedules",
"outer_alias": "xnob",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_00024 | train |
v3 | Schema:
products (alias: nad)(status, date, type, id)
schedules(amount, code, level, status)
Task: Retrieve amount from products with salary above the COUNT(amount) of schedules rows sharing the same type.
SQL: | SELECT amount FROM products AS nad
WHERE salary > (
SELECT COUNT(amount) FROM schedules AS vmob
WHERE vmob.type = nad.type
); | {
"outer_table": "products",
"inner_table": "schedules",
"outer_alias": "nad",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00025 | train |
v3 | Schema:
items (alias: ikob)(code, status, amount, value)
accounts(code, status, salary, name)
Task: Retrieve amount from items with value above the SUM(salary) of accounts rows sharing the same status.
SQL: | SELECT amount FROM items AS ikob
WHERE value > (
SELECT SUM(salary) FROM accounts AS jac
WHERE jac.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "accounts",
"outer_alias": "ikob",
"inner_alias": "jac",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_00026 | train |
v2 | Schema:
departments (alias: dov)(amount, salary, status, type)
products(name, type, status, amount)
Task: Retrieve id from departments that have at least one corresponding entry in products sharing the same level.
SQL: | SELECT id FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "products",
"outer_alias": "dov",
"inner_alias": "nad",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00027 | train |
v3 | Schema:
projects (alias: uliv)(amount, level, name, value)
staff(status, code, id, name)
Task: Find code from projects where salary exceeds the average amount from staff for the same status.
SQL: | SELECT code FROM projects AS uliv
WHERE salary > (
SELECT AVG(amount) FROM staff AS xnob
WHERE xnob.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "staff",
"outer_alias": "uliv",
"inner_alias": "xnob",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_00028 | train |
v1 | Schema:
requests (alias: ejof)(name, level, code, status)
managers(salary, status, level, value)
Task: Retrieve salary from requests whose status is found in managers rows where level matches the outer record.
SQL: | SELECT salary FROM requests AS ejof
WHERE status IN (
SELECT status FROM managers AS hac
WHERE hac.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "managers",
"outer_alias": "ejof",
"inner_alias": "hac",
"proj_col": "salary",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_00029 | train |
v1 | Schema:
departments (alias: dov)(type, code, name, value)
tasks(code, type, level, name)
Task: Select value from departments where code exists in tasks for the same type.
SQL: | SELECT value FROM departments AS dov
WHERE code IN (
SELECT code FROM tasks AS znob
WHERE znob.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "tasks",
"outer_alias": "dov",
"inner_alias": "znob",
"proj_col": "value",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00030 | train |
v3 | Schema:
staff (alias: xnob)(name, amount, date, status)
projects(status, type, date, salary)
Task: Find name from staff where salary exceeds the count of value from projects for the same status.
SQL: | SELECT name FROM staff AS xnob
WHERE salary > (
SELECT COUNT(value) FROM projects AS uliv
WHERE uliv.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "projects",
"outer_alias": "xnob",
"inner_alias": "uliv",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_00031 | train |
v3 | Schema:
customers (alias: lex)(name, amount, date, type)
orders(level, code, amount, value)
Task: Retrieve name from customers with amount above the COUNT(amount) of orders rows sharing the same type.
SQL: | SELECT name FROM customers AS lex
WHERE amount > (
SELECT COUNT(amount) FROM orders AS kab
WHERE kab.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "orders",
"outer_alias": "lex",
"inner_alias": "kab",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00032 | train |
v1 | Schema:
managers (alias: hac)(level, id, amount, status)
departments(amount, id, status, type)
Task: Retrieve name from managers whose level is found in departments rows where code matches the outer record.
SQL: | SELECT name FROM managers AS hac
WHERE level IN (
SELECT level FROM departments AS dov
WHERE dov.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "departments",
"outer_alias": "hac",
"inner_alias": "dov",
"proj_col": "name",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00033 | train |
v2 | Schema:
customers (alias: lex)(level, date, value, amount)
projects(name, level, salary, status)
Task: Find value from customers where a matching record exists in projects with the same status.
SQL: | SELECT value FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "projects",
"outer_alias": "lex",
"inner_alias": "uliv",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00034 | train |
v1 | Schema:
products (alias: nad)(amount, level, name, salary)
managers(id, code, status, value)
Task: Retrieve amount from products whose level is found in managers rows where type matches the outer record.
SQL: | SELECT amount FROM products AS nad
WHERE level IN (
SELECT level FROM managers AS hac
WHERE hac.type = nad.type
); | {
"outer_table": "products",
"inner_table": "managers",
"outer_alias": "nad",
"inner_alias": "hac",
"proj_col": "amount",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00035 | train |
v3 | Schema:
requests (alias: ejof)(date, code, salary, type)
schedules(date, salary, name, value)
Task: Find salary from requests where value exceeds the maximum amount from schedules for the same level.
SQL: | SELECT salary FROM requests AS ejof
WHERE value > (
SELECT MAX(amount) FROM schedules AS vmob
WHERE vmob.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "schedules",
"outer_alias": "ejof",
"inner_alias": "vmob",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_00036 | train |
v2 | Schema:
accounts (alias: jac)(salary, date, amount, status)
branches(code, id, type, level)
Task: Find amount from accounts where a matching record exists in branches with the same status.
SQL: | SELECT amount 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": "amount",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00037 | train |
v2 | Schema:
transactions (alias: gev)(value, name, type, level)
projects(amount, name, date, id)
Task: Find code from transactions where a matching record exists in projects with the same type.
SQL: | SELECT code FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "projects",
"outer_alias": "gev",
"inner_alias": "uliv",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00038 | train |
v1 | Schema:
products (alias: nad)(salary, status, value, level)
invoices(value, type, salary, status)
Task: Find amount from products where level appears in invoices entries with matching level.
SQL: | SELECT amount FROM products AS nad
WHERE level IN (
SELECT level FROM invoices AS fal
WHERE fal.level = nad.level
); | {
"outer_table": "products",
"inner_table": "invoices",
"outer_alias": "nad",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00039 | train |
v3 | Schema:
tasks (alias: znob)(salary, type, amount, status)
sales(salary, level, date, code)
Task: Find salary from tasks where salary exceeds the maximum amount from sales for the same level.
SQL: | SELECT salary FROM tasks AS znob
WHERE salary > (
SELECT MAX(amount) FROM sales AS cif
WHERE cif.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "sales",
"outer_alias": "znob",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_00040 | train |
v3 | Schema:
schedules (alias: vmob)(level, name, salary, amount)
staff(amount, id, level, code)
Task: Retrieve amount from schedules with value above the MIN(salary) of staff rows sharing the same type.
SQL: | SELECT amount FROM schedules AS vmob
WHERE value > (
SELECT MIN(salary) FROM staff AS xnob
WHERE xnob.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "staff",
"outer_alias": "vmob",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_00041 | train |
v1 | Schema:
items (alias: ikob)(code, type, amount, id)
regions(type, id, salary, amount)
Task: Select id from items where type exists in regions for the same level.
SQL: | SELECT id FROM items AS ikob
WHERE type IN (
SELECT type FROM regions AS okiv
WHERE okiv.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "regions",
"outer_alias": "ikob",
"inner_alias": "okiv",
"proj_col": "id",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_00042 | train |
v1 | Schema:
shipments (alias: vnob)(id, name, level, amount)
items(date, name, amount, status)
Task: Retrieve id from shipments whose code is found in items rows where status matches the outer record.
SQL: | SELECT id FROM shipments AS vnob
WHERE code IN (
SELECT code FROM items AS ikob
WHERE ikob.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "items",
"outer_alias": "vnob",
"inner_alias": "ikob",
"proj_col": "id",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_00043 | train |
v3 | Schema:
employees (alias: bev)(status, name, id, amount)
branches(code, amount, salary, status)
Task: Find amount from employees where amount exceeds the average amount from branches for the same id.
SQL: | SELECT amount FROM employees AS bev
WHERE amount > (
SELECT AVG(amount) FROM branches AS agov
WHERE agov.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "branches",
"outer_alias": "bev",
"inner_alias": "agov",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00044 | train |
v1 | Schema:
categories (alias: egiv)(salary, amount, date, level)
projects(status, salary, amount, date)
Task: Select name from categories where code exists in projects for the same id.
SQL: | SELECT name FROM categories AS egiv
WHERE code IN (
SELECT code FROM projects AS uliv
WHERE uliv.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "projects",
"outer_alias": "egiv",
"inner_alias": "uliv",
"proj_col": "name",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_00045 | train |
v2 | Schema:
transactions (alias: gev)(salary, type, amount, level)
staff(level, salary, type, value)
Task: Find id from transactions where a matching record exists in staff with the same level.
SQL: | SELECT id FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "staff",
"outer_alias": "gev",
"inner_alias": "xnob",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00046 | train |
v1 | Schema:
managers (alias: hac)(amount, date, salary, id)
categories(date, amount, level, type)
Task: Retrieve amount from managers whose code is found in categories rows where status matches the outer record.
SQL: | SELECT amount FROM managers AS hac
WHERE code IN (
SELECT code FROM categories AS egiv
WHERE egiv.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "categories",
"outer_alias": "hac",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00047 | train |
v3 | Schema:
invoices (alias: fal)(date, name, salary, status)
categories(date, status, level, value)
Task: Find code from invoices where amount exceeds the count of salary from categories for the same id.
SQL: | SELECT code FROM invoices AS fal
WHERE amount > (
SELECT COUNT(salary) FROM categories AS egiv
WHERE egiv.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "categories",
"outer_alias": "fal",
"inner_alias": "egiv",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00048 | train |
v1 | Schema:
schedules (alias: vmob)(date, status, type, amount)
transactions(level, salary, type, code)
Task: Retrieve id from schedules whose level is found in transactions rows where code matches the outer record.
SQL: | SELECT id FROM schedules AS vmob
WHERE level IN (
SELECT level FROM transactions AS gev
WHERE gev.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "transactions",
"outer_alias": "vmob",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_00049 | train |
v1 | Schema:
customers (alias: lex)(date, id, value, type)
departments(name, code, level, date)
Task: Retrieve name from customers whose status is found in departments rows where id matches the outer record.
SQL: | SELECT name FROM customers AS lex
WHERE status IN (
SELECT status FROM departments AS dov
WHERE dov.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "departments",
"outer_alias": "lex",
"inner_alias": "dov",
"proj_col": "name",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00050 | train |
v3 | Schema:
employees (alias: bev)(name, value, date, type)
tasks(name, salary, date, amount)
Task: Find code from employees where amount exceeds the total value from tasks for the same status.
SQL: | SELECT code FROM employees AS bev
WHERE amount > (
SELECT SUM(value) FROM tasks AS znob
WHERE znob.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "tasks",
"outer_alias": "bev",
"inner_alias": "znob",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00051 | train |
v3 | Schema:
sales (alias: cif)(id, status, level, name)
departments(type, code, status, level)
Task: Retrieve amount from sales with amount above the MIN(amount) of departments rows sharing the same type.
SQL: | SELECT amount FROM sales AS cif
WHERE amount > (
SELECT MIN(amount) FROM departments AS dov
WHERE dov.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "departments",
"outer_alias": "cif",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00052 | train |
v3 | Schema:
sales (alias: cif)(status, salary, level, name)
products(salary, value, code, type)
Task: Retrieve name from sales with amount above the SUM(salary) of products rows sharing the same type.
SQL: | SELECT name FROM sales AS cif
WHERE amount > (
SELECT SUM(salary) FROM products AS nad
WHERE nad.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "products",
"outer_alias": "cif",
"inner_alias": "nad",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00053 | train |
v2 | Schema:
tasks (alias: znob)(level, value, code, name)
sales(level, id, status, date)
Task: Find id from tasks where a matching record exists in sales with the same type.
SQL: | SELECT id FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "sales",
"outer_alias": "znob",
"inner_alias": "cif",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_00054 | train |
v3 | Schema:
projects (alias: uliv)(status, date, amount, code)
categories(status, type, name, level)
Task: Retrieve name from projects with salary above the MIN(amount) of categories rows sharing the same code.
SQL: | SELECT name FROM projects AS uliv
WHERE salary > (
SELECT MIN(amount) FROM categories AS egiv
WHERE egiv.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "categories",
"outer_alias": "uliv",
"inner_alias": "egiv",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_00055 | train |
v3 | Schema:
accounts (alias: jac)(id, status, level, type)
categories(code, id, level, value)
Task: Find code from accounts where salary exceeds the count of salary from categories for the same status.
SQL: | SELECT code FROM accounts AS jac
WHERE salary > (
SELECT COUNT(salary) FROM categories AS egiv
WHERE egiv.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "categories",
"outer_alias": "jac",
"inner_alias": "egiv",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00056 | train |
v3 | Schema:
tasks (alias: znob)(id, status, level, name)
staff(status, type, id, amount)
Task: Retrieve amount from tasks with value above the MAX(amount) of staff rows sharing the same code.
SQL: | SELECT amount FROM tasks AS znob
WHERE value > (
SELECT MAX(amount) FROM staff AS xnob
WHERE xnob.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "staff",
"outer_alias": "znob",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_00057 | train |
v2 | Schema:
projects (alias: uliv)(value, amount, code, name)
staff(amount, code, id, value)
Task: Retrieve amount from projects that have at least one corresponding entry in staff sharing the same level.
SQL: | SELECT amount FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "staff",
"outer_alias": "uliv",
"inner_alias": "xnob",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_00058 | train |
v2 | Schema:
items (alias: ikob)(type, date, id, value)
tasks(level, status, amount, code)
Task: Retrieve name from items that have at least one corresponding entry in tasks sharing the same type.
SQL: | SELECT name FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "tasks",
"outer_alias": "ikob",
"inner_alias": "znob",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_00059 | train |
v3 | Schema:
categories (alias: egiv)(id, amount, status, name)
orders(id, code, status, value)
Task: Find id from categories where amount exceeds the minimum salary from orders for the same type.
SQL: | SELECT id FROM categories AS egiv
WHERE amount > (
SELECT MIN(salary) FROM orders AS kab
WHERE kab.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "orders",
"outer_alias": "egiv",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_00060 | train |
v1 | Schema:
regions (alias: okiv)(id, name, salary, value)
customers(type, date, code, name)
Task: Find value from regions where status appears in customers entries with matching status.
SQL: | SELECT value FROM regions AS okiv
WHERE status IN (
SELECT status FROM customers AS lex
WHERE lex.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "customers",
"outer_alias": "okiv",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_00061 | train |
v3 | Schema:
products (alias: nad)(name, value, level, date)
departments(code, amount, level, name)
Task: Find amount from products where value exceeds the minimum salary from departments for the same id.
SQL: | SELECT amount FROM products AS nad
WHERE value > (
SELECT MIN(salary) FROM departments AS dov
WHERE dov.id = nad.id
); | {
"outer_table": "products",
"inner_table": "departments",
"outer_alias": "nad",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00062 | train |
v2 | Schema:
managers (alias: hac)(name, level, status, date)
projects(value, code, salary, amount)
Task: Retrieve id from managers that have at least one corresponding entry in projects sharing the same code.
SQL: | SELECT id FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "projects",
"outer_alias": "hac",
"inner_alias": "uliv",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00063 | train |
v3 | Schema:
shipments (alias: vnob)(level, type, code, status)
staff(id, code, amount, date)
Task: Retrieve value from shipments with salary above the AVG(salary) of staff rows sharing the same level.
SQL: | SELECT value FROM shipments AS vnob
WHERE salary > (
SELECT AVG(salary) FROM staff AS xnob
WHERE xnob.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "staff",
"outer_alias": "vnob",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_00064 | train |
v1 | Schema:
products (alias: nad)(value, id, date, amount)
projects(level, status, date, type)
Task: Select code from products where id exists in projects for the same code.
SQL: | SELECT code FROM products AS nad
WHERE id IN (
SELECT id FROM projects AS uliv
WHERE uliv.code = nad.code
); | {
"outer_table": "products",
"inner_table": "projects",
"outer_alias": "nad",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00065 | train |
v3 | Schema:
items (alias: ikob)(date, value, level, salary)
schedules(type, id, level, date)
Task: Retrieve value from items with value above the COUNT(value) of schedules rows sharing the same id.
SQL: | SELECT value FROM items AS ikob
WHERE value > (
SELECT COUNT(value) FROM schedules AS vmob
WHERE vmob.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "schedules",
"outer_alias": "ikob",
"inner_alias": "vmob",
"proj_col": "value",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_00066 | train |
v2 | Schema:
requests (alias: ejof)(status, value, id, type)
orders(value, type, level, date)
Task: Retrieve amount from requests that have at least one corresponding entry in orders sharing the same code.
SQL: | SELECT amount FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "orders",
"outer_alias": "ejof",
"inner_alias": "kab",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_00067 | train |
v3 | Schema:
accounts (alias: jac)(status, code, id, name)
invoices(level, id, salary, type)
Task: Find code from accounts where value exceeds the average amount from invoices for the same level.
SQL: | SELECT code FROM accounts AS jac
WHERE value > (
SELECT AVG(amount) FROM invoices AS fal
WHERE fal.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "invoices",
"outer_alias": "jac",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00068 | train |
v1 | Schema:
orders (alias: kab)(status, type, id, level)
staff(type, status, id, salary)
Task: Select amount from orders where type exists in staff for the same code.
SQL: | SELECT amount FROM orders AS kab
WHERE type IN (
SELECT type FROM staff AS xnob
WHERE xnob.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "staff",
"outer_alias": "kab",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00069 | train |
v3 | Schema:
items (alias: ikob)(id, level, type, amount)
branches(name, id, value, level)
Task: Find salary from items where salary exceeds the average value from branches for the same type.
SQL: | SELECT salary FROM items AS ikob
WHERE salary > (
SELECT AVG(value) FROM branches AS agov
WHERE agov.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "branches",
"outer_alias": "ikob",
"inner_alias": "agov",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_00070 | train |
v2 | Schema:
invoices (alias: fal)(level, code, salary, id)
transactions(code, name, salary, level)
Task: Find salary from invoices where a matching record exists in transactions with the same id.
SQL: | SELECT salary FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "transactions",
"outer_alias": "fal",
"inner_alias": "gev",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00071 | train |
v1 | Schema:
projects (alias: uliv)(amount, status, level, id)
tasks(name, value, type, id)
Task: Select id from projects where type exists in tasks for the same level.
SQL: | SELECT id FROM projects AS uliv
WHERE type IN (
SELECT type FROM tasks AS znob
WHERE znob.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "tasks",
"outer_alias": "uliv",
"inner_alias": "znob",
"proj_col": "id",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_00072 | train |
v2 | Schema:
regions (alias: okiv)(status, date, code, name)
categories(amount, id, status, salary)
Task: Find name from regions where a matching record exists in categories with the same id.
SQL: | SELECT name FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "categories",
"outer_alias": "okiv",
"inner_alias": "egiv",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_00073 | train |
v2 | Schema:
orders (alias: kab)(level, salary, value, status)
staff(amount, status, name, code)
Task: Find name from orders where a matching record exists in staff with the same id.
SQL: | SELECT name FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "staff",
"outer_alias": "kab",
"inner_alias": "xnob",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00074 | train |
v2 | Schema:
departments (alias: dov)(date, value, name, id)
requests(level, date, salary, id)
Task: Find code from departments where a matching record exists in requests with the same level.
SQL: | SELECT code FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "requests",
"outer_alias": "dov",
"inner_alias": "ejof",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00075 | train |
v3 | Schema:
tasks (alias: znob)(amount, code, name, date)
employees(date, value, status, name)
Task: Retrieve id from tasks with amount above the MAX(salary) of employees rows sharing the same status.
SQL: | SELECT id FROM tasks AS znob
WHERE amount > (
SELECT MAX(salary) FROM employees AS bev
WHERE bev.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "employees",
"outer_alias": "znob",
"inner_alias": "bev",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_00076 | train |
v3 | Schema:
employees (alias: bev)(date, status, amount, salary)
products(code, date, value, level)
Task: Retrieve amount from employees with value above the SUM(amount) of products rows sharing the same status.
SQL: | SELECT amount FROM employees AS bev
WHERE value > (
SELECT SUM(amount) FROM products AS nad
WHERE nad.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "products",
"outer_alias": "bev",
"inner_alias": "nad",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00077 | train |
v1 | Schema:
tasks (alias: znob)(value, name, date, level)
transactions(name, salary, value, id)
Task: Select code from tasks where type exists in transactions for the same id.
SQL: | SELECT code FROM tasks AS znob
WHERE type IN (
SELECT type FROM transactions AS gev
WHERE gev.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "transactions",
"outer_alias": "znob",
"inner_alias": "gev",
"proj_col": "code",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_00078 | train |
v1 | Schema:
orders (alias: kab)(status, type, value, date)
items(type, name, salary, code)
Task: Retrieve salary from orders whose code is found in items rows where status matches the outer record.
SQL: | SELECT salary FROM orders AS kab
WHERE code IN (
SELECT code FROM items AS ikob
WHERE ikob.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "items",
"outer_alias": "kab",
"inner_alias": "ikob",
"proj_col": "salary",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00079 | train |
v1 | Schema:
customers (alias: lex)(date, level, name, id)
projects(status, level, id, amount)
Task: Select code from customers where code exists in projects for the same code.
SQL: | SELECT code FROM customers AS lex
WHERE code IN (
SELECT code FROM projects AS uliv
WHERE uliv.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "projects",
"outer_alias": "lex",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00080 | train |
v3 | Schema:
transactions (alias: gev)(salary, type, status, name)
sales(status, level, amount, name)
Task: Retrieve name from transactions with amount above the SUM(salary) of sales rows sharing the same code.
SQL: | SELECT name FROM transactions AS gev
WHERE amount > (
SELECT SUM(salary) FROM sales AS cif
WHERE cif.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "sales",
"outer_alias": "gev",
"inner_alias": "cif",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00081 | train |
v3 | Schema:
regions (alias: okiv)(salary, id, date, value)
accounts(date, status, id, type)
Task: Retrieve value from regions with salary above the COUNT(amount) of accounts rows sharing the same type.
SQL: | SELECT value FROM regions AS okiv
WHERE salary > (
SELECT COUNT(amount) FROM accounts AS jac
WHERE jac.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "accounts",
"outer_alias": "okiv",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_00082 | train |
v1 | Schema:
projects (alias: uliv)(date, id, status, salary)
invoices(level, status, salary, code)
Task: Find amount from projects where level appears in invoices entries with matching level.
SQL: | SELECT amount FROM projects AS uliv
WHERE level IN (
SELECT level FROM invoices AS fal
WHERE fal.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "invoices",
"outer_alias": "uliv",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_00083 | train |
v1 | Schema:
transactions (alias: gev)(value, type, code, date)
categories(status, salary, type, id)
Task: Select name from transactions where code exists in categories for the same id.
SQL: | SELECT name FROM transactions AS gev
WHERE code IN (
SELECT code FROM categories AS egiv
WHERE egiv.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "categories",
"outer_alias": "gev",
"inner_alias": "egiv",
"proj_col": "name",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00084 | train |
v3 | Schema:
staff (alias: xnob)(salary, code, date, type)
departments(id, date, name, level)
Task: Find salary from staff where value exceeds the minimum amount from departments for the same id.
SQL: | SELECT salary FROM staff AS xnob
WHERE value > (
SELECT MIN(amount) FROM departments AS dov
WHERE dov.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "departments",
"outer_alias": "xnob",
"inner_alias": "dov",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_00085 | train |
v3 | Schema:
staff (alias: xnob)(amount, code, value, salary)
accounts(status, amount, value, level)
Task: Retrieve name from staff with salary above the SUM(amount) of accounts rows sharing the same status.
SQL: | SELECT name FROM staff AS xnob
WHERE salary > (
SELECT SUM(amount) FROM accounts AS jac
WHERE jac.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "accounts",
"outer_alias": "xnob",
"inner_alias": "jac",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_00086 | train |
v1 | Schema:
sales (alias: cif)(salary, code, date, level)
staff(status, value, code, id)
Task: Find id from sales where type appears in staff entries with matching status.
SQL: | SELECT id FROM sales AS cif
WHERE type IN (
SELECT type FROM staff AS xnob
WHERE xnob.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "staff",
"outer_alias": "cif",
"inner_alias": "xnob",
"proj_col": "id",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00087 | train |
v1 | Schema:
shipments (alias: vnob)(type, name, level, id)
schedules(value, id, status, name)
Task: Find id from shipments where level appears in schedules entries with matching level.
SQL: | SELECT id FROM shipments AS vnob
WHERE level IN (
SELECT level FROM schedules AS vmob
WHERE vmob.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "schedules",
"outer_alias": "vnob",
"inner_alias": "vmob",
"proj_col": "id",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_00088 | train |
v1 | Schema:
products (alias: nad)(date, amount, code, name)
projects(salary, date, code, name)
Task: Retrieve code from products whose level is found in projects rows where id matches the outer record.
SQL: | SELECT code FROM products AS nad
WHERE level IN (
SELECT level FROM projects AS uliv
WHERE uliv.id = nad.id
); | {
"outer_table": "products",
"inner_table": "projects",
"outer_alias": "nad",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00089 | train |
v2 | Schema:
staff (alias: xnob)(code, id, value, type)
shipments(id, type, date, name)
Task: Retrieve salary from staff that have at least one corresponding entry in shipments sharing the same id.
SQL: | SELECT salary FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "shipments",
"outer_alias": "xnob",
"inner_alias": "vnob",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_00090 | train |
v1 | Schema:
departments (alias: dov)(id, salary, date, status)
tasks(status, salary, type, code)
Task: Find amount from departments where id appears in tasks entries with matching code.
SQL: | SELECT amount FROM departments AS dov
WHERE id IN (
SELECT id FROM tasks AS znob
WHERE znob.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "tasks",
"outer_alias": "dov",
"inner_alias": "znob",
"proj_col": "amount",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00091 | train |
v3 | Schema:
regions (alias: okiv)(status, amount, name, date)
departments(id, type, amount, salary)
Task: Find code from regions where salary exceeds the minimum value from departments for the same id.
SQL: | SELECT code FROM regions AS okiv
WHERE salary > (
SELECT MIN(value) FROM departments AS dov
WHERE dov.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "departments",
"outer_alias": "okiv",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_00092 | train |
v3 | Schema:
accounts (alias: jac)(level, type, salary, amount)
customers(level, salary, value, id)
Task: Find id from accounts where salary exceeds the minimum amount from customers for the same id.
SQL: | SELECT id FROM accounts AS jac
WHERE salary > (
SELECT MIN(amount) FROM customers AS lex
WHERE lex.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "customers",
"outer_alias": "jac",
"inner_alias": "lex",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00093 | train |
v2 | Schema:
categories (alias: egiv)(type, code, date, salary)
products(level, salary, status, amount)
Task: Find name from categories where a matching record exists in products with the same level.
SQL: | SELECT name FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "products",
"outer_alias": "egiv",
"inner_alias": "nad",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_00094 | train |
v3 | Schema:
staff (alias: xnob)(amount, salary, code, id)
schedules(salary, amount, id, level)
Task: Retrieve name from staff with value above the AVG(salary) of schedules rows sharing the same code.
SQL: | SELECT name FROM staff AS xnob
WHERE value > (
SELECT AVG(salary) FROM schedules AS vmob
WHERE vmob.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "schedules",
"outer_alias": "xnob",
"inner_alias": "vmob",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_00095 | train |
v1 | Schema:
invoices (alias: fal)(code, name, value, type)
schedules(code, id, value, amount)
Task: Find id from invoices where code appears in schedules entries with matching id.
SQL: | SELECT id FROM invoices AS fal
WHERE code IN (
SELECT code FROM schedules AS vmob
WHERE vmob.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "schedules",
"outer_alias": "fal",
"inner_alias": "vmob",
"proj_col": "id",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00096 | train |
v1 | Schema:
regions (alias: okiv)(amount, level, id, value)
managers(type, name, code, status)
Task: Select amount from regions where id exists in managers for the same level.
SQL: | SELECT amount FROM regions AS okiv
WHERE id IN (
SELECT id FROM managers AS hac
WHERE hac.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "managers",
"outer_alias": "okiv",
"inner_alias": "hac",
"proj_col": "amount",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_00097 | train |
v1 | Schema:
managers (alias: hac)(value, level, code, name)
transactions(amount, date, id, level)
Task: Select code from managers where type exists in transactions for the same id.
SQL: | SELECT code FROM managers AS hac
WHERE type IN (
SELECT type FROM transactions AS gev
WHERE gev.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "transactions",
"outer_alias": "hac",
"inner_alias": "gev",
"proj_col": "code",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00098 | train |
v3 | Schema:
tasks (alias: znob)(salary, name, level, id)
invoices(level, type, amount, salary)
Task: Retrieve value from tasks with amount above the SUM(value) of invoices rows sharing the same type.
SQL: | SELECT value FROM tasks AS znob
WHERE amount > (
SELECT SUM(value) FROM invoices AS fal
WHERE fal.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "invoices",
"outer_alias": "znob",
"inner_alias": "fal",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_00099 | train |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 24