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:
schedules (alias: vmob)(status, id, date, type)
products(id, name, code, status)
Task: Retrieve code from schedules that have at least one corresponding entry in products sharing the same type.
SQL: | SELECT code FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "products",
"outer_alias": "vmob",
"inner_alias": "nad",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_01900 | train |
v3 | Schema:
departments (alias: dov)(salary, value, status, level)
customers(value, name, level, code)
Task: Retrieve amount from departments with amount above the COUNT(amount) of customers rows sharing the same code.
SQL: | SELECT amount FROM departments AS dov
WHERE amount > (
SELECT COUNT(amount) FROM customers AS lex
WHERE lex.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "customers",
"outer_alias": "dov",
"inner_alias": "lex",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01901 | train |
v2 | Schema:
invoices (alias: fal)(amount, type, value, salary)
categories(type, salary, amount, level)
Task: Find amount from invoices where a matching record exists in categories with the same type.
SQL: | SELECT amount FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "categories",
"outer_alias": "fal",
"inner_alias": "egiv",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01902 | train |
v1 | Schema:
orders (alias: kab)(type, level, salary, name)
shipments(level, id, salary, amount)
Task: Retrieve code from orders whose level is found in shipments rows where type matches the outer record.
SQL: | SELECT code FROM orders AS kab
WHERE level IN (
SELECT level FROM shipments AS vnob
WHERE vnob.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "shipments",
"outer_alias": "kab",
"inner_alias": "vnob",
"proj_col": "code",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01903 | train |
v2 | Schema:
departments (alias: dov)(level, name, id, salary)
managers(value, type, status, code)
Task: Find code from departments where a matching record exists in managers with 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_01904 | train |
v3 | Schema:
managers (alias: hac)(value, amount, salary, status)
departments(amount, value, date, salary)
Task: Retrieve salary from managers with salary above the SUM(amount) of departments rows sharing the same level.
SQL: | SELECT salary FROM managers AS hac
WHERE salary > (
SELECT SUM(amount) FROM departments AS dov
WHERE dov.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "departments",
"outer_alias": "hac",
"inner_alias": "dov",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01905 | train |
v1 | Schema:
sales (alias: cif)(id, type, name, date)
categories(id, value, salary, amount)
Task: Retrieve salary from sales whose type is found in categories rows where type matches the outer record.
SQL: | SELECT salary FROM sales AS cif
WHERE type IN (
SELECT type FROM categories AS egiv
WHERE egiv.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "categories",
"outer_alias": "cif",
"inner_alias": "egiv",
"proj_col": "salary",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01906 | train |
v3 | Schema:
requests (alias: ejof)(value, status, type, id)
branches(salary, value, status, amount)
Task: Retrieve code from requests with amount above the MIN(salary) of branches rows sharing the same level.
SQL: | SELECT code FROM requests AS ejof
WHERE amount > (
SELECT MIN(salary) FROM branches AS agov
WHERE agov.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "branches",
"outer_alias": "ejof",
"inner_alias": "agov",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01907 | train |
v1 | Schema:
projects (alias: uliv)(type, level, status, date)
sales(status, name, date, amount)
Task: Select id from projects where level exists in sales for the same level.
SQL: | SELECT id FROM projects AS uliv
WHERE level IN (
SELECT level FROM sales AS cif
WHERE cif.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "sales",
"outer_alias": "uliv",
"inner_alias": "cif",
"proj_col": "id",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_01908 | train |
v2 | Schema:
branches (alias: agov)(code, level, name, date)
transactions(amount, date, name, id)
Task: Retrieve amount from branches that have at least one corresponding entry in transactions sharing the same status.
SQL: | SELECT amount FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "transactions",
"outer_alias": "agov",
"inner_alias": "gev",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_01909 | train |
v3 | Schema:
items (alias: ikob)(type, value, code, salary)
accounts(code, type, date, id)
Task: Find value from items where amount exceeds the count of salary from accounts for the same code.
SQL: | SELECT value FROM items AS ikob
WHERE amount > (
SELECT COUNT(salary) FROM accounts AS jac
WHERE jac.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "accounts",
"outer_alias": "ikob",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_01910 | train |
v1 | Schema:
projects (alias: uliv)(salary, name, level, type)
categories(type, name, date, code)
Task: Retrieve salary from projects whose level is found in categories rows where code matches the outer record.
SQL: | SELECT salary FROM projects AS uliv
WHERE level IN (
SELECT level FROM categories AS egiv
WHERE egiv.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "categories",
"outer_alias": "uliv",
"inner_alias": "egiv",
"proj_col": "salary",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_01911 | train |
v2 | Schema:
departments (alias: dov)(type, id, amount, salary)
shipments(type, amount, name, status)
Task: Retrieve amount from departments that have at least one corresponding entry in shipments sharing the same id.
SQL: | SELECT amount FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "shipments",
"outer_alias": "dov",
"inner_alias": "vnob",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01912 | train |
v3 | Schema:
products (alias: nad)(type, code, id, value)
sales(code, type, value, id)
Task: Find salary from products where amount exceeds the minimum amount from sales for the same code.
SQL: | SELECT salary FROM products AS nad
WHERE amount > (
SELECT MIN(amount) FROM sales AS cif
WHERE cif.code = nad.code
); | {
"outer_table": "products",
"inner_table": "sales",
"outer_alias": "nad",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01913 | train |
v1 | Schema:
staff (alias: xnob)(status, code, amount, id)
managers(salary, type, value, amount)
Task: Retrieve salary from staff whose type is found in managers rows where type matches the outer record.
SQL: | SELECT salary FROM staff AS xnob
WHERE type IN (
SELECT type FROM managers AS hac
WHERE hac.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "managers",
"outer_alias": "xnob",
"inner_alias": "hac",
"proj_col": "salary",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01914 | train |
v2 | Schema:
categories (alias: egiv)(code, value, status, type)
managers(value, date, level, name)
Task: Find value from categories where a matching record exists in managers with the same id.
SQL: | SELECT value FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "managers",
"outer_alias": "egiv",
"inner_alias": "hac",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01915 | train |
v3 | Schema:
sales (alias: cif)(status, id, type, date)
projects(type, amount, name, date)
Task: Retrieve name from sales with value above the SUM(value) of projects rows sharing the same id.
SQL: | SELECT name FROM sales AS cif
WHERE value > (
SELECT SUM(value) FROM projects AS uliv
WHERE uliv.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "projects",
"outer_alias": "cif",
"inner_alias": "uliv",
"proj_col": "name",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01916 | train |
v3 | Schema:
shipments (alias: vnob)(status, amount, value, date)
sales(type, id, salary, level)
Task: Retrieve salary from shipments with salary above the AVG(amount) of sales rows sharing the same id.
SQL: | SELECT salary FROM shipments AS vnob
WHERE salary > (
SELECT AVG(amount) FROM sales AS cif
WHERE cif.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "sales",
"outer_alias": "vnob",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01917 | train |
v2 | Schema:
requests (alias: ejof)(type, name, date, amount)
items(value, date, type, status)
Task: Retrieve amount from requests that have at least one corresponding entry in items sharing the same code.
SQL: | SELECT amount FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "items",
"outer_alias": "ejof",
"inner_alias": "ikob",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01918 | train |
v2 | Schema:
items (alias: ikob)(name, type, id, level)
accounts(value, type, id, level)
Task: Retrieve amount from items that have at least one corresponding entry in accounts sharing the same type.
SQL: | SELECT amount FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "accounts",
"outer_alias": "ikob",
"inner_alias": "jac",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_01919 | train |
v1 | Schema:
orders (alias: kab)(amount, level, id, name)
employees(level, value, name, id)
Task: Retrieve code from orders whose status is found in employees rows where code matches the outer record.
SQL: | SELECT code FROM orders AS kab
WHERE status IN (
SELECT status FROM employees AS bev
WHERE bev.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "employees",
"outer_alias": "kab",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01920 | train |
v3 | Schema:
schedules (alias: vmob)(level, salary, id, value)
requests(type, id, value, name)
Task: Find value from schedules where value exceeds the count of value from requests for the same type.
SQL: | SELECT value FROM schedules AS vmob
WHERE value > (
SELECT COUNT(value) FROM requests AS ejof
WHERE ejof.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "requests",
"outer_alias": "vmob",
"inner_alias": "ejof",
"proj_col": "value",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_01921 | train |
v1 | Schema:
branches (alias: agov)(code, level, name, date)
regions(code, salary, id, name)
Task: Select code from branches where type exists in regions for the same id.
SQL: | SELECT code FROM branches AS agov
WHERE type IN (
SELECT type FROM regions AS okiv
WHERE okiv.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "regions",
"outer_alias": "agov",
"inner_alias": "okiv",
"proj_col": "code",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_01922 | train |
v1 | Schema:
shipments (alias: vnob)(value, name, salary, level)
categories(value, id, name, salary)
Task: Select value from shipments where status exists in categories for the same type.
SQL: | SELECT value FROM shipments AS vnob
WHERE status IN (
SELECT status FROM categories AS egiv
WHERE egiv.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "categories",
"outer_alias": "vnob",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01923 | train |
v1 | Schema:
departments (alias: dov)(name, type, salary, level)
branches(type, date, name, status)
Task: Select value from departments where id exists in branches for the same level.
SQL: | SELECT value FROM departments AS dov
WHERE id IN (
SELECT id FROM branches AS agov
WHERE agov.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "branches",
"outer_alias": "dov",
"inner_alias": "agov",
"proj_col": "value",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01924 | train |
v3 | Schema:
employees (alias: bev)(id, name, type, date)
accounts(id, salary, level, code)
Task: Retrieve name from employees with amount above the MIN(value) of accounts rows sharing the same level.
SQL: | SELECT name FROM employees AS bev
WHERE amount > (
SELECT MIN(value) FROM accounts AS jac
WHERE jac.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "accounts",
"outer_alias": "bev",
"inner_alias": "jac",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01925 | train |
v1 | Schema:
shipments (alias: vnob)(value, amount, salary, date)
branches(name, value, code, type)
Task: Find name from shipments where level appears in branches entries with matching id.
SQL: | SELECT name FROM shipments AS vnob
WHERE level IN (
SELECT level FROM branches AS agov
WHERE agov.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "branches",
"outer_alias": "vnob",
"inner_alias": "agov",
"proj_col": "name",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01926 | train |
v2 | Schema:
customers (alias: lex)(amount, value, salary, name)
regions(date, id, amount, status)
Task: Find id from customers where a matching record exists in regions with the same level.
SQL: | SELECT id FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "regions",
"outer_alias": "lex",
"inner_alias": "okiv",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01927 | train |
v2 | Schema:
staff (alias: xnob)(code, type, name, status)
products(code, id, name, status)
Task: Find amount from staff where a matching record exists in products with the same status.
SQL: | SELECT amount FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "products",
"outer_alias": "xnob",
"inner_alias": "nad",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01928 | train |
v1 | Schema:
orders (alias: kab)(amount, salary, id, name)
schedules(name, type, value, level)
Task: Find salary from orders where type appears in schedules entries with matching status.
SQL: | SELECT salary FROM orders AS kab
WHERE type IN (
SELECT type FROM schedules AS vmob
WHERE vmob.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "schedules",
"outer_alias": "kab",
"inner_alias": "vmob",
"proj_col": "salary",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01929 | train |
v2 | Schema:
requests (alias: ejof)(id, date, code, type)
transactions(code, salary, type, id)
Task: Retrieve code from requests that have at least one corresponding entry in transactions sharing the same status.
SQL: | SELECT code FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "transactions",
"outer_alias": "ejof",
"inner_alias": "gev",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01930 | train |
v1 | Schema:
tasks (alias: znob)(value, code, id, date)
categories(status, value, name, code)
Task: Select salary from tasks where code exists in categories for the same code.
SQL: | SELECT salary FROM tasks AS znob
WHERE code IN (
SELECT code FROM categories AS egiv
WHERE egiv.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "categories",
"outer_alias": "znob",
"inner_alias": "egiv",
"proj_col": "salary",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_01931 | train |
v2 | Schema:
staff (alias: xnob)(date, id, value, type)
categories(code, status, type, name)
Task: Retrieve salary from staff that have at least one corresponding entry in categories sharing the same code.
SQL: | SELECT salary FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "categories",
"outer_alias": "xnob",
"inner_alias": "egiv",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01932 | train |
v1 | Schema:
projects (alias: uliv)(level, id, type, code)
schedules(level, code, id, type)
Task: Find value from projects where status appears in schedules entries with matching status.
SQL: | SELECT value FROM projects AS uliv
WHERE status IN (
SELECT status FROM schedules AS vmob
WHERE vmob.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "schedules",
"outer_alias": "uliv",
"inner_alias": "vmob",
"proj_col": "value",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_01933 | train |
v1 | Schema:
staff (alias: xnob)(code, id, type, name)
orders(value, name, salary, type)
Task: Select salary from staff where type exists in orders for the same status.
SQL: | SELECT salary FROM staff AS xnob
WHERE type IN (
SELECT type FROM orders AS kab
WHERE kab.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "orders",
"outer_alias": "xnob",
"inner_alias": "kab",
"proj_col": "salary",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01934 | train |
v3 | Schema:
projects (alias: uliv)(amount, name, level, status)
departments(value, date, id, code)
Task: Find salary from projects where value exceeds the minimum value from departments for the same code.
SQL: | SELECT salary FROM projects AS uliv
WHERE value > (
SELECT MIN(value) FROM departments AS dov
WHERE dov.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "departments",
"outer_alias": "uliv",
"inner_alias": "dov",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_01935 | train |
v3 | Schema:
customers (alias: lex)(amount, type, status, date)
schedules(id, salary, code, level)
Task: Find amount from customers where amount exceeds the maximum salary from schedules for the same level.
SQL: | SELECT amount FROM customers AS lex
WHERE amount > (
SELECT MAX(salary) FROM schedules AS vmob
WHERE vmob.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "schedules",
"outer_alias": "lex",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01936 | train |
v1 | Schema:
managers (alias: hac)(amount, date, code, name)
orders(level, status, id, value)
Task: Retrieve amount from managers whose code is found in orders rows where status matches the outer record.
SQL: | SELECT amount FROM managers AS hac
WHERE code IN (
SELECT code FROM orders AS kab
WHERE kab.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "orders",
"outer_alias": "hac",
"inner_alias": "kab",
"proj_col": "amount",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01937 | train |
v3 | Schema:
transactions (alias: gev)(value, status, code, amount)
categories(id, date, name, salary)
Task: Retrieve id from transactions with value above the MAX(salary) of categories rows sharing the same level.
SQL: | SELECT id FROM transactions AS gev
WHERE value > (
SELECT MAX(salary) FROM categories AS egiv
WHERE egiv.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "categories",
"outer_alias": "gev",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01938 | train |
v2 | Schema:
sales (alias: cif)(id, date, amount, status)
shipments(status, amount, id, code)
Task: Find amount from sales where a matching record exists in shipments with the same type.
SQL: | SELECT amount FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "shipments",
"outer_alias": "cif",
"inner_alias": "vnob",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01939 | train |
v1 | Schema:
accounts (alias: jac)(level, value, type, date)
projects(salary, value, type, name)
Task: Select id from accounts where code exists in projects for the same status.
SQL: | SELECT id FROM accounts AS jac
WHERE code IN (
SELECT code FROM projects AS uliv
WHERE uliv.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "projects",
"outer_alias": "jac",
"inner_alias": "uliv",
"proj_col": "id",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01940 | train |
v3 | Schema:
projects (alias: uliv)(date, salary, type, level)
regions(id, date, code, salary)
Task: Retrieve value from projects with salary above the MAX(amount) of regions rows sharing the same level.
SQL: | SELECT value FROM projects AS uliv
WHERE salary > (
SELECT MAX(amount) FROM regions AS okiv
WHERE okiv.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "regions",
"outer_alias": "uliv",
"inner_alias": "okiv",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_01941 | train |
v2 | Schema:
shipments (alias: vnob)(amount, code, name, id)
managers(salary, id, level, name)
Task: Retrieve name from shipments that have at least one corresponding entry in managers sharing the same status.
SQL: | SELECT name FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "managers",
"outer_alias": "vnob",
"inner_alias": "hac",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01942 | train |
v1 | Schema:
items (alias: ikob)(level, id, date, status)
shipments(code, amount, status, name)
Task: Select salary from items where id exists in shipments for the same code.
SQL: | SELECT salary FROM items AS ikob
WHERE id IN (
SELECT id FROM shipments AS vnob
WHERE vnob.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "shipments",
"outer_alias": "ikob",
"inner_alias": "vnob",
"proj_col": "salary",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_01943 | train |
v1 | Schema:
regions (alias: okiv)(type, code, salary, name)
branches(value, id, salary, status)
Task: Retrieve name from regions whose code is found in branches rows where id matches the outer record.
SQL: | SELECT name FROM regions AS okiv
WHERE code IN (
SELECT code FROM branches AS agov
WHERE agov.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "branches",
"outer_alias": "okiv",
"inner_alias": "agov",
"proj_col": "name",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_01944 | train |
v3 | Schema:
categories (alias: egiv)(status, type, name, value)
transactions(type, id, name, code)
Task: Retrieve amount from categories with salary above the COUNT(salary) of transactions rows sharing the same id.
SQL: | SELECT amount FROM categories AS egiv
WHERE salary > (
SELECT COUNT(salary) FROM transactions AS gev
WHERE gev.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "transactions",
"outer_alias": "egiv",
"inner_alias": "gev",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01945 | train |
v2 | Schema:
sales (alias: cif)(id, amount, code, name)
schedules(amount, date, type, salary)
Task: Retrieve name from sales that have at least one corresponding entry in schedules sharing the same level.
SQL: | SELECT name FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "schedules",
"outer_alias": "cif",
"inner_alias": "vmob",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01946 | train |
v2 | Schema:
staff (alias: xnob)(status, amount, level, code)
customers(id, status, name, value)
Task: Find salary from staff where a matching record exists in customers with the same status.
SQL: | SELECT salary FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "customers",
"outer_alias": "xnob",
"inner_alias": "lex",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01947 | train |
v2 | Schema:
invoices (alias: fal)(type, code, date, level)
branches(amount, type, level, date)
Task: Retrieve amount from invoices that have at least one corresponding entry in branches sharing the same id.
SQL: | SELECT amount FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "branches",
"outer_alias": "fal",
"inner_alias": "agov",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01948 | train |
v1 | Schema:
invoices (alias: fal)(name, level, status, date)
accounts(date, salary, value, level)
Task: Retrieve id from invoices whose id is found in accounts rows where level matches the outer record.
SQL: | SELECT id FROM invoices AS fal
WHERE id IN (
SELECT id FROM accounts AS jac
WHERE jac.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "accounts",
"outer_alias": "fal",
"inner_alias": "jac",
"proj_col": "id",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01949 | train |
v2 | Schema:
accounts (alias: jac)(name, id, value, level)
shipments(date, type, salary, level)
Task: Find value from accounts where a matching record exists in shipments with the same status.
SQL: | SELECT value FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "shipments",
"outer_alias": "jac",
"inner_alias": "vnob",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01950 | train |
v1 | Schema:
invoices (alias: fal)(value, status, id, amount)
products(code, level, id, type)
Task: Select id from invoices where type exists in products for the same id.
SQL: | SELECT id FROM invoices AS fal
WHERE type IN (
SELECT type FROM products AS nad
WHERE nad.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "products",
"outer_alias": "fal",
"inner_alias": "nad",
"proj_col": "id",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01951 | train |
v3 | Schema:
invoices (alias: fal)(status, date, salary, id)
accounts(value, amount, level, id)
Task: Retrieve code from invoices with salary above the MIN(amount) of accounts rows sharing the same code.
SQL: | SELECT code FROM invoices AS fal
WHERE salary > (
SELECT MIN(amount) FROM accounts AS jac
WHERE jac.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "accounts",
"outer_alias": "fal",
"inner_alias": "jac",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01952 | train |
v3 | Schema:
customers (alias: lex)(value, status, id, name)
transactions(level, amount, date, type)
Task: Find name from customers where amount exceeds the average amount from transactions for the same type.
SQL: | SELECT name FROM customers AS lex
WHERE amount > (
SELECT AVG(amount) FROM transactions AS gev
WHERE gev.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "transactions",
"outer_alias": "lex",
"inner_alias": "gev",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01953 | train |
v2 | Schema:
projects (alias: uliv)(id, amount, value, date)
managers(salary, level, code, type)
Task: Find value from projects where a matching record exists in managers with the same level.
SQL: | SELECT value FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "managers",
"outer_alias": "uliv",
"inner_alias": "hac",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_01954 | train |
v3 | Schema:
accounts (alias: jac)(type, date, id, value)
departments(code, value, salary, status)
Task: Retrieve name from accounts with value above the SUM(amount) of departments rows sharing the same id.
SQL: | SELECT name FROM accounts AS jac
WHERE value > (
SELECT SUM(amount) FROM departments AS dov
WHERE dov.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "departments",
"outer_alias": "jac",
"inner_alias": "dov",
"proj_col": "name",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01955 | train |
v1 | Schema:
departments (alias: dov)(date, name, amount, code)
invoices(code, salary, amount, status)
Task: Select salary from departments where id exists in invoices for the same id.
SQL: | SELECT salary FROM departments AS dov
WHERE id IN (
SELECT id FROM invoices AS fal
WHERE fal.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "invoices",
"outer_alias": "dov",
"inner_alias": "fal",
"proj_col": "salary",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01956 | train |
v2 | Schema:
schedules (alias: vmob)(salary, date, amount, id)
employees(type, salary, id, code)
Task: Retrieve value from schedules that have at least one corresponding entry in employees sharing the same id.
SQL: | SELECT value FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "employees",
"outer_alias": "vmob",
"inner_alias": "bev",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_01957 | train |
v1 | Schema:
orders (alias: kab)(name, salary, date, id)
managers(code, amount, level, name)
Task: Find amount from orders where code appears in managers entries with matching id.
SQL: | SELECT amount FROM orders AS kab
WHERE code IN (
SELECT code FROM managers AS hac
WHERE hac.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "managers",
"outer_alias": "kab",
"inner_alias": "hac",
"proj_col": "amount",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01958 | train |
v1 | Schema:
invoices (alias: fal)(status, amount, name, date)
requests(amount, value, date, type)
Task: Select name from invoices where status exists in requests for the same code.
SQL: | SELECT name FROM invoices AS fal
WHERE status IN (
SELECT status FROM requests AS ejof
WHERE ejof.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "requests",
"outer_alias": "fal",
"inner_alias": "ejof",
"proj_col": "name",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01959 | train |
v1 | Schema:
categories (alias: egiv)(date, value, type, code)
projects(level, type, value, amount)
Task: Retrieve value from categories whose type is found in projects rows where level matches the outer record.
SQL: | SELECT value FROM categories AS egiv
WHERE type IN (
SELECT type FROM projects AS uliv
WHERE uliv.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "projects",
"outer_alias": "egiv",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01960 | train |
v2 | Schema:
employees (alias: bev)(date, id, level, type)
categories(id, salary, value, date)
Task: Find value from employees where a matching record exists in categories with the same level.
SQL: | SELECT value FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "categories",
"outer_alias": "bev",
"inner_alias": "egiv",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01961 | train |
v2 | Schema:
schedules (alias: vmob)(amount, code, level, salary)
transactions(level, code, amount, type)
Task: Find value from schedules where a matching record exists in transactions with the same status.
SQL: | SELECT value FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "transactions",
"outer_alias": "vmob",
"inner_alias": "gev",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_01962 | train |
v3 | Schema:
shipments (alias: vnob)(salary, value, name, amount)
accounts(value, type, level, code)
Task: Find salary from shipments where salary exceeds the count of salary from accounts for the same id.
SQL: | SELECT salary FROM shipments AS vnob
WHERE salary > (
SELECT COUNT(salary) FROM accounts AS jac
WHERE jac.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "accounts",
"outer_alias": "vnob",
"inner_alias": "jac",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01963 | train |
v3 | Schema:
requests (alias: ejof)(id, amount, type, date)
tasks(amount, type, name, status)
Task: Find amount from requests where value exceeds the minimum value from tasks for the same level.
SQL: | SELECT amount FROM requests AS ejof
WHERE value > (
SELECT MIN(value) FROM tasks AS znob
WHERE znob.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "tasks",
"outer_alias": "ejof",
"inner_alias": "znob",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01964 | train |
v2 | Schema:
staff (alias: xnob)(date, name, salary, id)
transactions(level, name, status, code)
Task: Find code from staff where a matching record exists in transactions with the same level.
SQL: | SELECT code FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.level = xnob.level
); | {
"outer_table": "staff",
"inner_table": "transactions",
"outer_alias": "xnob",
"inner_alias": "gev",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "xnob.level",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01965 | train |
v3 | Schema:
orders (alias: kab)(code, level, value, salary)
transactions(name, status, value, date)
Task: Find name from orders where amount exceeds the count of amount from transactions for the same type.
SQL: | SELECT name FROM orders AS kab
WHERE amount > (
SELECT COUNT(amount) FROM transactions AS gev
WHERE gev.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "transactions",
"outer_alias": "kab",
"inner_alias": "gev",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01966 | train |
v1 | Schema:
customers (alias: lex)(level, value, salary, amount)
accounts(status, code, value, level)
Task: Find value from customers where type appears in accounts entries with matching type.
SQL: | SELECT value FROM customers AS lex
WHERE type IN (
SELECT type FROM accounts AS jac
WHERE jac.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "accounts",
"outer_alias": "lex",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01967 | train |
v2 | Schema:
invoices (alias: fal)(amount, salary, value, code)
orders(status, code, level, type)
Task: Find id from invoices where a matching record exists in orders with the same status.
SQL: | SELECT id FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "orders",
"outer_alias": "fal",
"inner_alias": "kab",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01968 | train |
v2 | Schema:
schedules (alias: vmob)(date, id, type, amount)
departments(code, name, date, salary)
Task: Retrieve amount from schedules that have at least one corresponding entry in departments sharing the same id.
SQL: | SELECT amount FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "departments",
"outer_alias": "vmob",
"inner_alias": "dov",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_01969 | train |
v2 | Schema:
departments (alias: dov)(amount, value, code, type)
products(date, amount, level, name)
Task: Retrieve name from departments that have at least one corresponding entry in products sharing the same code.
SQL: | SELECT name FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "products",
"outer_alias": "dov",
"inner_alias": "nad",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01970 | train |
v2 | Schema:
staff (alias: xnob)(type, name, amount, date)
projects(value, code, name, type)
Task: Find code from staff where a matching record exists in projects with the same status.
SQL: | SELECT code FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "projects",
"outer_alias": "xnob",
"inner_alias": "uliv",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01971 | train |
v2 | Schema:
employees (alias: bev)(amount, status, value, name)
accounts(salary, level, code, status)
Task: Find amount from employees where a matching record exists in accounts with the same status.
SQL: | SELECT amount FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "accounts",
"outer_alias": "bev",
"inner_alias": "jac",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01972 | train |
v2 | Schema:
branches (alias: agov)(value, type, level, status)
transactions(amount, date, name, status)
Task: Retrieve amount from branches that have at least one corresponding entry in transactions sharing the same status.
SQL: | SELECT amount FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "transactions",
"outer_alias": "agov",
"inner_alias": "gev",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_01973 | train |
v2 | Schema:
items (alias: ikob)(name, salary, level, value)
products(value, amount, status, name)
Task: Find salary from items where a matching record exists in products with the same status.
SQL: | SELECT salary FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "products",
"outer_alias": "ikob",
"inner_alias": "nad",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_01974 | train |
v2 | Schema:
products (alias: nad)(value, level, amount, status)
regions(value, status, amount, code)
Task: Retrieve name from products that have at least one corresponding entry in regions sharing the same type.
SQL: | SELECT name FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.type = nad.type
); | {
"outer_table": "products",
"inner_table": "regions",
"outer_alias": "nad",
"inner_alias": "okiv",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01975 | train |
v1 | Schema:
branches (alias: agov)(status, date, id, level)
employees(value, status, code, amount)
Task: Retrieve name from branches whose id is found in employees rows where code matches the outer record.
SQL: | SELECT name FROM branches AS agov
WHERE id IN (
SELECT id FROM employees AS bev
WHERE bev.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "employees",
"outer_alias": "agov",
"inner_alias": "bev",
"proj_col": "name",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_01976 | train |
v2 | Schema:
invoices (alias: fal)(level, type, salary, value)
transactions(amount, level, salary, date)
Task: Retrieve name from invoices that have at least one corresponding entry in transactions sharing the same type.
SQL: | SELECT name FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "transactions",
"outer_alias": "fal",
"inner_alias": "gev",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01977 | train |
v3 | Schema:
projects (alias: uliv)(name, status, type, salary)
employees(id, salary, name, amount)
Task: Find name from projects where value exceeds the maximum amount from employees for the same level.
SQL: | SELECT name FROM projects AS uliv
WHERE value > (
SELECT MAX(amount) FROM employees AS bev
WHERE bev.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "employees",
"outer_alias": "uliv",
"inner_alias": "bev",
"proj_col": "name",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_01978 | train |
v3 | Schema:
managers (alias: hac)(salary, id, date, code)
orders(status, amount, level, code)
Task: Find salary from managers where salary exceeds the count of salary from orders for the same id.
SQL: | SELECT salary FROM managers AS hac
WHERE salary > (
SELECT COUNT(salary) FROM orders AS kab
WHERE kab.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "orders",
"outer_alias": "hac",
"inner_alias": "kab",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01979 | train |
v1 | Schema:
shipments (alias: vnob)(amount, salary, code, level)
requests(date, amount, value, level)
Task: Retrieve code from shipments whose code is found in requests rows where code matches the outer record.
SQL: | SELECT code FROM shipments AS vnob
WHERE code IN (
SELECT code FROM requests AS ejof
WHERE ejof.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "requests",
"outer_alias": "vnob",
"inner_alias": "ejof",
"proj_col": "code",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01980 | train |
v3 | Schema:
transactions (alias: gev)(status, type, code, value)
invoices(id, status, salary, date)
Task: Find code from transactions where amount exceeds the count of value from invoices for the same code.
SQL: | SELECT code FROM transactions AS gev
WHERE amount > (
SELECT COUNT(value) FROM invoices AS fal
WHERE fal.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "invoices",
"outer_alias": "gev",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01981 | train |
v2 | Schema:
categories (alias: egiv)(salary, level, value, status)
sales(date, type, id, code)
Task: Find amount from categories where a matching record exists in sales with the same id.
SQL: | SELECT amount FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "sales",
"outer_alias": "egiv",
"inner_alias": "cif",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01982 | train |
v1 | Schema:
customers (alias: lex)(value, amount, type, id)
departments(type, salary, name, status)
Task: Find code from customers where status appears in departments entries with matching type.
SQL: | SELECT code FROM customers AS lex
WHERE status IN (
SELECT status FROM departments AS dov
WHERE dov.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "departments",
"outer_alias": "lex",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01983 | train |
v3 | Schema:
customers (alias: lex)(level, salary, name, value)
invoices(type, salary, status, level)
Task: Retrieve amount from customers with amount above the SUM(value) of invoices rows sharing the same status.
SQL: | SELECT amount FROM customers AS lex
WHERE amount > (
SELECT SUM(value) FROM invoices AS fal
WHERE fal.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "invoices",
"outer_alias": "lex",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01984 | train |
v3 | Schema:
products (alias: nad)(name, id, date, value)
shipments(date, salary, level, code)
Task: Retrieve value from products with amount above the SUM(salary) of shipments rows sharing the same id.
SQL: | SELECT value FROM products AS nad
WHERE amount > (
SELECT SUM(salary) FROM shipments AS vnob
WHERE vnob.id = nad.id
); | {
"outer_table": "products",
"inner_table": "shipments",
"outer_alias": "nad",
"inner_alias": "vnob",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01985 | train |
v1 | Schema:
accounts (alias: jac)(name, level, status, value)
departments(status, amount, id, level)
Task: Find salary from accounts where type appears in departments entries with matching status.
SQL: | SELECT salary FROM accounts AS jac
WHERE type IN (
SELECT type FROM departments AS dov
WHERE dov.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "departments",
"outer_alias": "jac",
"inner_alias": "dov",
"proj_col": "salary",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01986 | train |
v3 | Schema:
requests (alias: ejof)(status, type, code, salary)
items(name, value, type, level)
Task: Retrieve amount from requests with value above the AVG(salary) of items rows sharing the same status.
SQL: | SELECT amount FROM requests AS ejof
WHERE value > (
SELECT AVG(salary) FROM items AS ikob
WHERE ikob.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "items",
"outer_alias": "ejof",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01987 | train |
v3 | Schema:
projects (alias: uliv)(code, date, id, level)
categories(name, code, date, salary)
Task: Find id from projects where amount exceeds the count of value from categories for the same type.
SQL: | SELECT id FROM projects AS uliv
WHERE amount > (
SELECT COUNT(value) FROM categories AS egiv
WHERE egiv.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "categories",
"outer_alias": "uliv",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_01988 | train |
v2 | Schema:
categories (alias: egiv)(amount, status, date, name)
accounts(code, level, amount, name)
Task: Find salary from categories where a matching record exists in accounts with the same type.
SQL: | SELECT salary 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": "salary",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01989 | train |
v3 | Schema:
accounts (alias: jac)(id, date, value, salary)
projects(code, salary, amount, id)
Task: Retrieve salary from accounts with value above the MIN(value) of projects rows sharing the same id.
SQL: | SELECT salary FROM accounts AS jac
WHERE value > (
SELECT MIN(value) FROM projects AS uliv
WHERE uliv.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "projects",
"outer_alias": "jac",
"inner_alias": "uliv",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01990 | train |
v1 | Schema:
departments (alias: dov)(id, name, type, salary)
employees(type, date, salary, name)
Task: Retrieve amount from departments whose code is found in employees rows where code matches the outer record.
SQL: | SELECT amount FROM departments AS dov
WHERE code IN (
SELECT code FROM employees AS bev
WHERE bev.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "employees",
"outer_alias": "dov",
"inner_alias": "bev",
"proj_col": "amount",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01991 | train |
v2 | Schema:
categories (alias: egiv)(amount, type, id, name)
items(date, id, level, type)
Task: Retrieve name from categories that have at least one corresponding entry in items sharing the same status.
SQL: | SELECT name FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "items",
"outer_alias": "egiv",
"inner_alias": "ikob",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01992 | train |
v1 | Schema:
tasks (alias: znob)(salary, type, date, name)
invoices(code, date, type, salary)
Task: Select amount from tasks where code exists in invoices for the same status.
SQL: | SELECT amount FROM tasks AS znob
WHERE code IN (
SELECT code 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": "code",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_01993 | train |
v3 | Schema:
orders (alias: kab)(level, status, code, id)
branches(id, salary, status, value)
Task: Find name from orders where salary exceeds the total amount from branches for the same level.
SQL: | SELECT name FROM orders AS kab
WHERE salary > (
SELECT SUM(amount) FROM branches AS agov
WHERE agov.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "branches",
"outer_alias": "kab",
"inner_alias": "agov",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01994 | train |
v2 | Schema:
tasks (alias: znob)(name, id, type, amount)
branches(name, code, amount, value)
Task: Retrieve id from tasks that have at least one corresponding entry in branches sharing the same type.
SQL: | SELECT id FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "branches",
"outer_alias": "znob",
"inner_alias": "agov",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_01995 | train |
v3 | Schema:
tasks (alias: znob)(name, date, amount, value)
customers(level, code, id, salary)
Task: Find id from tasks where value exceeds the minimum amount from customers for the same status.
SQL: | SELECT id FROM tasks AS znob
WHERE value > (
SELECT MIN(amount) FROM customers AS lex
WHERE lex.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "customers",
"outer_alias": "znob",
"inner_alias": "lex",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_01996 | train |
v1 | Schema:
shipments (alias: vnob)(code, status, type, amount)
projects(type, code, name, value)
Task: Find code from shipments where id appears in projects entries with matching level.
SQL: | SELECT code FROM shipments AS vnob
WHERE id IN (
SELECT id FROM projects AS uliv
WHERE uliv.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "projects",
"outer_alias": "vnob",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01997 | train |
v1 | Schema:
schedules (alias: vmob)(level, value, salary, code)
accounts(type, code, date, salary)
Task: Retrieve id from schedules whose id is found in accounts rows where status matches the outer record.
SQL: | SELECT id FROM schedules AS vmob
WHERE id IN (
SELECT id FROM accounts AS jac
WHERE jac.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "accounts",
"outer_alias": "vmob",
"inner_alias": "jac",
"proj_col": "id",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_01998 | train |
v1 | Schema:
invoices (alias: fal)(amount, type, status, level)
transactions(salary, amount, id, code)
Task: Retrieve salary from invoices whose status is found in transactions rows where id matches the outer record.
SQL: | SELECT salary FROM invoices AS fal
WHERE status IN (
SELECT status FROM transactions AS gev
WHERE gev.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "transactions",
"outer_alias": "fal",
"inner_alias": "gev",
"proj_col": "salary",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01999 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.