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:
tasks (alias: znob)(date, name, code, salary)
invoices(level, date, amount, salary)
Task: Retrieve id from tasks that have at least one corresponding entry in invoices sharing the same id.
SQL: | SELECT id FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "invoices",
"outer_alias": "znob",
"inner_alias": "fal",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_19000 | train |
v2 | Schema:
transactions (alias: gev)(level, salary, name, date)
projects(amount, value, type, level)
Task: Retrieve amount from transactions that have at least one corresponding entry in projects sharing the same id.
SQL: | SELECT amount FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "projects",
"outer_alias": "gev",
"inner_alias": "uliv",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19001 | train |
v2 | Schema:
staff (alias: xnob)(salary, code, amount, level)
regions(name, code, id, date)
Task: Retrieve salary from staff that have at least one corresponding entry in regions sharing the same type.
SQL: | SELECT salary FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "regions",
"outer_alias": "xnob",
"inner_alias": "okiv",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_19002 | train |
v1 | Schema:
orders (alias: kab)(type, amount, value, level)
tasks(status, type, value, date)
Task: Select code from orders where status exists in tasks for the same id.
SQL: | SELECT code FROM orders AS kab
WHERE status IN (
SELECT status FROM tasks AS znob
WHERE znob.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "tasks",
"outer_alias": "kab",
"inner_alias": "znob",
"proj_col": "code",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19003 | train |
v2 | Schema:
schedules (alias: vmob)(amount, id, code, status)
managers(status, amount, salary, type)
Task: Retrieve value from schedules that have at least one corresponding entry in managers sharing the same id.
SQL: | SELECT value FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "managers",
"outer_alias": "vmob",
"inner_alias": "hac",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_19004 | train |
v2 | Schema:
products (alias: nad)(salary, date, id, type)
departments(salary, code, date, type)
Task: Find amount from products where a matching record exists in departments with the same id.
SQL: | SELECT amount FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.id = nad.id
); | {
"outer_table": "products",
"inner_table": "departments",
"outer_alias": "nad",
"inner_alias": "dov",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19005 | train |
v1 | Schema:
customers (alias: lex)(date, value, id, status)
categories(id, level, amount, name)
Task: Find name from customers where status appears in categories entries with matching level.
SQL: | SELECT name FROM customers AS lex
WHERE status IN (
SELECT status FROM categories AS egiv
WHERE egiv.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "categories",
"outer_alias": "lex",
"inner_alias": "egiv",
"proj_col": "name",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19006 | train |
v2 | Schema:
shipments (alias: vnob)(status, value, amount, salary)
orders(status, level, amount, value)
Task: Find amount from shipments where a matching record exists in orders with the same level.
SQL: | SELECT amount FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "orders",
"outer_alias": "vnob",
"inner_alias": "kab",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_19007 | train |
v2 | Schema:
departments (alias: dov)(date, amount, name, level)
products(date, type, status, amount)
Task: Retrieve id from departments that have at least one corresponding entry in products sharing the same code.
SQL: | SELECT id 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": "id",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19008 | train |
v1 | Schema:
categories (alias: egiv)(id, status, code, date)
shipments(salary, type, amount, level)
Task: Retrieve salary from categories whose level is found in shipments rows where status matches the outer record.
SQL: | SELECT salary FROM categories AS egiv
WHERE level IN (
SELECT level FROM shipments AS vnob
WHERE vnob.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "shipments",
"outer_alias": "egiv",
"inner_alias": "vnob",
"proj_col": "salary",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_19009 | train |
v1 | Schema:
sales (alias: cif)(type, salary, level, amount)
schedules(value, date, amount, type)
Task: Select name from sales where code exists in schedules for the same type.
SQL: | SELECT name FROM sales AS cif
WHERE code IN (
SELECT code FROM schedules AS vmob
WHERE vmob.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "schedules",
"outer_alias": "cif",
"inner_alias": "vmob",
"proj_col": "name",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19010 | train |
v1 | Schema:
departments (alias: dov)(level, salary, amount, status)
orders(status, salary, amount, code)
Task: Find value from departments where level appears in orders entries with matching code.
SQL: | SELECT value FROM departments AS dov
WHERE level IN (
SELECT level FROM orders AS kab
WHERE kab.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "orders",
"outer_alias": "dov",
"inner_alias": "kab",
"proj_col": "value",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19011 | train |
v3 | Schema:
orders (alias: kab)(type, salary, status, id)
items(status, code, type, value)
Task: Retrieve id from orders with amount above the SUM(salary) of items rows sharing the same code.
SQL: | SELECT id FROM orders AS kab
WHERE amount > (
SELECT SUM(salary) FROM items AS ikob
WHERE ikob.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "items",
"outer_alias": "kab",
"inner_alias": "ikob",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19012 | train |
v1 | Schema:
departments (alias: dov)(code, status, type, salary)
items(id, name, type, date)
Task: Retrieve code from departments whose level is found in items rows where type matches the outer record.
SQL: | SELECT code FROM departments AS dov
WHERE level IN (
SELECT level FROM items AS ikob
WHERE ikob.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "items",
"outer_alias": "dov",
"inner_alias": "ikob",
"proj_col": "code",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19013 | train |
v2 | Schema:
departments (alias: dov)(name, salary, status, value)
customers(salary, code, value, name)
Task: Find salary from departments where a matching record exists in customers with the same status.
SQL: | SELECT salary FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "customers",
"outer_alias": "dov",
"inner_alias": "lex",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19014 | train |
v1 | Schema:
employees (alias: bev)(status, value, code, salary)
items(name, id, type, status)
Task: Retrieve value from employees whose level is found in items rows where code matches the outer record.
SQL: | SELECT value FROM employees AS bev
WHERE level IN (
SELECT level FROM items AS ikob
WHERE ikob.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "items",
"outer_alias": "bev",
"inner_alias": "ikob",
"proj_col": "value",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19015 | train |
v2 | Schema:
orders (alias: kab)(amount, status, level, name)
regions(amount, name, code, value)
Task: Find salary from orders where a matching record exists in regions with the same type.
SQL: | SELECT salary FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "regions",
"outer_alias": "kab",
"inner_alias": "okiv",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19016 | train |
v3 | Schema:
orders (alias: kab)(value, salary, code, name)
customers(value, type, code, amount)
Task: Retrieve salary from orders with salary above the AVG(salary) of customers rows sharing the same id.
SQL: | SELECT salary FROM orders AS kab
WHERE salary > (
SELECT AVG(salary) FROM customers AS lex
WHERE lex.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "customers",
"outer_alias": "kab",
"inner_alias": "lex",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19017 | train |
v3 | Schema:
staff (alias: xnob)(amount, code, status, type)
customers(amount, type, name, salary)
Task: Retrieve value from staff with salary above the MIN(value) of customers rows sharing the same code.
SQL: | SELECT value FROM staff AS xnob
WHERE salary > (
SELECT MIN(value) FROM customers AS lex
WHERE lex.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "customers",
"outer_alias": "xnob",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_19018 | train |
v3 | Schema:
employees (alias: bev)(amount, salary, status, id)
customers(date, name, status, id)
Task: Retrieve code from employees with salary above the AVG(amount) of customers rows sharing the same code.
SQL: | SELECT code FROM employees AS bev
WHERE salary > (
SELECT AVG(amount) FROM customers AS lex
WHERE lex.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "customers",
"outer_alias": "bev",
"inner_alias": "lex",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19019 | train |
v2 | Schema:
categories (alias: egiv)(name, code, level, amount)
schedules(level, salary, id, date)
Task: Find amount from categories where a matching record exists in schedules with the same id.
SQL: | SELECT amount FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "schedules",
"outer_alias": "egiv",
"inner_alias": "vmob",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_19020 | train |
v1 | Schema:
departments (alias: dov)(status, salary, amount, type)
invoices(code, type, amount, value)
Task: Retrieve code from departments whose id is found in invoices rows where status matches the outer record.
SQL: | SELECT code FROM departments AS dov
WHERE id IN (
SELECT id FROM invoices AS fal
WHERE fal.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "invoices",
"outer_alias": "dov",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19021 | train |
v3 | Schema:
orders (alias: kab)(code, value, date, type)
requests(name, salary, id, type)
Task: Retrieve name from orders with salary above the AVG(value) of requests rows sharing the same type.
SQL: | SELECT name FROM orders AS kab
WHERE salary > (
SELECT AVG(value) FROM requests AS ejof
WHERE ejof.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "requests",
"outer_alias": "kab",
"inner_alias": "ejof",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19022 | train |
v2 | Schema:
customers (alias: lex)(level, amount, type, name)
invoices(date, name, code, level)
Task: Find code from customers where a matching record exists in invoices with the same id.
SQL: | SELECT code FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "invoices",
"outer_alias": "lex",
"inner_alias": "fal",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19023 | train |
v1 | Schema:
transactions (alias: gev)(date, id, amount, salary)
schedules(id, level, amount, status)
Task: Find salary from transactions where id appears in schedules entries with matching level.
SQL: | SELECT salary FROM transactions AS gev
WHERE id IN (
SELECT id FROM schedules AS vmob
WHERE vmob.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "schedules",
"outer_alias": "gev",
"inner_alias": "vmob",
"proj_col": "salary",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19024 | train |
v2 | Schema:
projects (alias: uliv)(date, code, value, status)
tasks(amount, value, level, salary)
Task: Find value from projects where a matching record exists in tasks with the same code.
SQL: | SELECT value FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "tasks",
"outer_alias": "uliv",
"inner_alias": "znob",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_19025 | train |
v2 | Schema:
shipments (alias: vnob)(code, id, level, amount)
schedules(code, level, value, name)
Task: Find name from shipments where a matching record exists in schedules with the same id.
SQL: | SELECT name FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "schedules",
"outer_alias": "vnob",
"inner_alias": "vmob",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_19026 | train |
v3 | Schema:
regions (alias: okiv)(id, salary, level, name)
projects(level, id, value, date)
Task: Find code from regions where amount exceeds the minimum value from projects for the same id.
SQL: | SELECT code FROM regions AS okiv
WHERE amount > (
SELECT MIN(value) FROM projects AS uliv
WHERE uliv.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "projects",
"outer_alias": "okiv",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_19027 | train |
v3 | Schema:
requests (alias: ejof)(id, salary, amount, level)
accounts(value, type, code, id)
Task: Retrieve value from requests with value above the MIN(salary) of accounts rows sharing the same level.
SQL: | SELECT value FROM requests AS ejof
WHERE value > (
SELECT MIN(salary) FROM accounts AS jac
WHERE jac.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "accounts",
"outer_alias": "ejof",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_19028 | train |
v2 | Schema:
items (alias: ikob)(salary, name, date, status)
projects(value, amount, type, code)
Task: Find name from items where a matching record exists in projects with the same type.
SQL: | SELECT name FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "projects",
"outer_alias": "ikob",
"inner_alias": "uliv",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_19029 | train |
v2 | Schema:
branches (alias: agov)(status, value, salary, name)
sales(date, code, id, salary)
Task: Find name from branches where a matching record exists in sales with the same type.
SQL: | SELECT name FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "sales",
"outer_alias": "agov",
"inner_alias": "cif",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_19030 | train |
v3 | Schema:
accounts (alias: jac)(name, salary, id, level)
customers(value, code, level, amount)
Task: Retrieve name from accounts with amount above the COUNT(value) of customers rows sharing the same id.
SQL: | SELECT name FROM accounts AS jac
WHERE amount > (
SELECT COUNT(value) FROM customers AS lex
WHERE lex.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "customers",
"outer_alias": "jac",
"inner_alias": "lex",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19031 | train |
v2 | Schema:
staff (alias: xnob)(type, value, id, amount)
tasks(id, code, salary, date)
Task: Retrieve amount from staff that have at least one corresponding entry in tasks sharing the same level.
SQL: | SELECT amount FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.level = xnob.level
); | {
"outer_table": "staff",
"inner_table": "tasks",
"outer_alias": "xnob",
"inner_alias": "znob",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "xnob.level",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_19032 | train |
v1 | Schema:
orders (alias: kab)(value, code, name, status)
items(amount, level, type, value)
Task: Select id from orders where status exists in items for the same id.
SQL: | SELECT id FROM orders AS kab
WHERE status IN (
SELECT status FROM items AS ikob
WHERE ikob.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "items",
"outer_alias": "kab",
"inner_alias": "ikob",
"proj_col": "id",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19033 | train |
v2 | Schema:
regions (alias: okiv)(salary, status, name, value)
accounts(name, amount, id, type)
Task: Retrieve amount from regions that have at least one corresponding entry in accounts sharing the same status.
SQL: | SELECT amount FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "accounts",
"outer_alias": "okiv",
"inner_alias": "jac",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_19034 | train |
v1 | Schema:
staff (alias: xnob)(value, amount, code, name)
projects(salary, date, code, id)
Task: Retrieve id from staff whose type is found in projects rows where id matches the outer record.
SQL: | SELECT id FROM staff AS xnob
WHERE type IN (
SELECT type FROM projects AS uliv
WHERE uliv.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "projects",
"outer_alias": "xnob",
"inner_alias": "uliv",
"proj_col": "id",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_19035 | train |
v1 | Schema:
products (alias: nad)(value, type, id, salary)
projects(name, level, amount, value)
Task: Retrieve value from products whose level is found in projects rows where level matches the outer record.
SQL: | SELECT value FROM products AS nad
WHERE level IN (
SELECT level FROM projects AS uliv
WHERE uliv.level = nad.level
); | {
"outer_table": "products",
"inner_table": "projects",
"outer_alias": "nad",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19036 | train |
v2 | Schema:
managers (alias: hac)(status, salary, code, amount)
categories(type, name, code, status)
Task: Retrieve name from managers that have at least one corresponding entry in categories sharing the same code.
SQL: | SELECT name FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "categories",
"outer_alias": "hac",
"inner_alias": "egiv",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19037 | train |
v3 | Schema:
staff (alias: xnob)(level, salary, name, date)
customers(status, salary, name, amount)
Task: Retrieve code from staff with salary above the MAX(salary) of customers rows sharing the same type.
SQL: | SELECT code FROM staff AS xnob
WHERE salary > (
SELECT MAX(salary) FROM customers AS lex
WHERE lex.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "customers",
"outer_alias": "xnob",
"inner_alias": "lex",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_19038 | train |
v1 | Schema:
schedules (alias: vmob)(code, id, salary, type)
customers(salary, level, amount, status)
Task: Select code from schedules where type exists in customers for the same type.
SQL: | SELECT code FROM schedules AS vmob
WHERE type IN (
SELECT type FROM customers AS lex
WHERE lex.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "customers",
"outer_alias": "vmob",
"inner_alias": "lex",
"proj_col": "code",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_19039 | train |
v2 | Schema:
transactions (alias: gev)(name, amount, code, date)
requests(name, type, level, code)
Task: Find value from transactions where a matching record exists in requests with the same level.
SQL: | SELECT value FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "requests",
"outer_alias": "gev",
"inner_alias": "ejof",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19040 | train |
v1 | Schema:
transactions (alias: gev)(level, name, id, status)
tasks(value, type, level, date)
Task: Find value from transactions where id appears in tasks entries with matching level.
SQL: | SELECT value FROM transactions AS gev
WHERE id IN (
SELECT id FROM tasks AS znob
WHERE znob.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "tasks",
"outer_alias": "gev",
"inner_alias": "znob",
"proj_col": "value",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19041 | train |
v1 | Schema:
staff (alias: xnob)(amount, value, status, type)
employees(type, id, amount, level)
Task: Select name from staff where type exists in employees for the same type.
SQL: | SELECT name FROM staff AS xnob
WHERE type IN (
SELECT type FROM employees AS bev
WHERE bev.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "employees",
"outer_alias": "xnob",
"inner_alias": "bev",
"proj_col": "name",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_19042 | train |
v2 | Schema:
departments (alias: dov)(date, status, code, salary)
sales(level, name, value, type)
Task: Retrieve salary from departments that have at least one corresponding entry in sales sharing the same status.
SQL: | SELECT salary FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "sales",
"outer_alias": "dov",
"inner_alias": "cif",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19043 | train |
v2 | Schema:
schedules (alias: vmob)(level, id, salary, value)
customers(id, date, status, value)
Task: Find name from schedules where a matching record exists in customers with the same status.
SQL: | SELECT name FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "customers",
"outer_alias": "vmob",
"inner_alias": "lex",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_19044 | train |
v3 | Schema:
departments (alias: dov)(level, amount, name, value)
orders(amount, date, level, value)
Task: Find salary from departments where salary exceeds the minimum salary from orders for the same status.
SQL: | SELECT salary FROM departments AS dov
WHERE salary > (
SELECT MIN(salary) FROM orders AS kab
WHERE kab.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "orders",
"outer_alias": "dov",
"inner_alias": "kab",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19045 | train |
v3 | Schema:
departments (alias: dov)(level, type, value, name)
regions(name, salary, date, status)
Task: Find code from departments where value exceeds the count of amount from regions for the same code.
SQL: | SELECT code FROM departments AS dov
WHERE value > (
SELECT COUNT(amount) FROM regions AS okiv
WHERE okiv.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "regions",
"outer_alias": "dov",
"inner_alias": "okiv",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19046 | train |
v2 | Schema:
tasks (alias: znob)(amount, date, name, type)
branches(date, value, name, salary)
Task: Retrieve salary from tasks that have at least one corresponding entry in branches sharing the same id.
SQL: | SELECT salary FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "branches",
"outer_alias": "znob",
"inner_alias": "agov",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_19047 | train |
v1 | Schema:
customers (alias: lex)(status, level, value, date)
orders(id, level, value, date)
Task: Select value from customers where status exists in orders for the same code.
SQL: | SELECT value FROM customers AS lex
WHERE status IN (
SELECT status FROM orders AS kab
WHERE kab.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "orders",
"outer_alias": "lex",
"inner_alias": "kab",
"proj_col": "value",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19048 | train |
v3 | Schema:
sales (alias: cif)(name, value, code, type)
orders(status, name, type, date)
Task: Find id from sales where salary exceeds the count of amount from orders for the same type.
SQL: | SELECT id FROM sales AS cif
WHERE salary > (
SELECT COUNT(amount) FROM orders AS kab
WHERE kab.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "orders",
"outer_alias": "cif",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19049 | train |
v1 | Schema:
customers (alias: lex)(id, status, type, value)
transactions(code, type, date, id)
Task: Retrieve salary from customers whose status is found in transactions rows where code matches the outer record.
SQL: | SELECT salary FROM customers AS lex
WHERE status IN (
SELECT status FROM transactions AS gev
WHERE gev.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "transactions",
"outer_alias": "lex",
"inner_alias": "gev",
"proj_col": "salary",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19050 | train |
v2 | Schema:
branches (alias: agov)(id, amount, status, salary)
customers(name, code, date, type)
Task: Retrieve code from branches that have at least one corresponding entry in customers sharing the same id.
SQL: | SELECT code FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "customers",
"outer_alias": "agov",
"inner_alias": "lex",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_19051 | train |
v2 | Schema:
requests (alias: ejof)(level, amount, status, type)
schedules(code, amount, id, name)
Task: Find salary from requests where a matching record exists in schedules with the same type.
SQL: | SELECT salary FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "schedules",
"outer_alias": "ejof",
"inner_alias": "vmob",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_19052 | train |
v3 | Schema:
invoices (alias: fal)(value, type, date, level)
shipments(amount, id, date, status)
Task: Retrieve code from invoices with salary above the AVG(value) of shipments rows sharing the same type.
SQL: | SELECT code FROM invoices AS fal
WHERE salary > (
SELECT AVG(value) FROM shipments AS vnob
WHERE vnob.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "shipments",
"outer_alias": "fal",
"inner_alias": "vnob",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19053 | train |
v2 | Schema:
employees (alias: bev)(value, id, date, salary)
transactions(date, name, type, code)
Task: Retrieve code from employees that have at least one corresponding entry in transactions sharing the same status.
SQL: | SELECT code FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "transactions",
"outer_alias": "bev",
"inner_alias": "gev",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19054 | train |
v3 | Schema:
schedules (alias: vmob)(amount, date, status, value)
requests(type, code, date, level)
Task: Retrieve amount from schedules with value above the AVG(amount) of requests rows sharing the same status.
SQL: | SELECT amount FROM schedules AS vmob
WHERE value > (
SELECT AVG(amount) FROM requests AS ejof
WHERE ejof.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "requests",
"outer_alias": "vmob",
"inner_alias": "ejof",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_19055 | train |
v1 | Schema:
categories (alias: egiv)(name, amount, date, code)
tasks(level, status, value, code)
Task: Retrieve name from categories whose id is found in tasks rows where id matches the outer record.
SQL: | SELECT name FROM categories AS egiv
WHERE id IN (
SELECT id FROM tasks AS znob
WHERE znob.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "tasks",
"outer_alias": "egiv",
"inner_alias": "znob",
"proj_col": "name",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_19056 | train |
v1 | Schema:
employees (alias: bev)(type, amount, code, value)
managers(amount, status, id, type)
Task: Find amount from employees where id appears in managers entries with matching code.
SQL: | SELECT amount FROM employees AS bev
WHERE id IN (
SELECT id FROM managers AS hac
WHERE hac.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "managers",
"outer_alias": "bev",
"inner_alias": "hac",
"proj_col": "amount",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19057 | train |
v1 | Schema:
staff (alias: xnob)(type, salary, status, code)
transactions(amount, salary, date, value)
Task: Retrieve id from staff whose code is found in transactions rows where code matches the outer record.
SQL: | SELECT id FROM staff AS xnob
WHERE code IN (
SELECT code FROM transactions AS gev
WHERE gev.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "transactions",
"outer_alias": "xnob",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_19058 | train |
v2 | Schema:
staff (alias: xnob)(id, code, name, type)
branches(type, date, amount, value)
Task: Retrieve id from staff that have at least one corresponding entry in branches sharing the same status.
SQL: | SELECT id FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "branches",
"outer_alias": "xnob",
"inner_alias": "agov",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_19059 | train |
v2 | Schema:
managers (alias: hac)(salary, status, type, amount)
categories(type, value, salary, amount)
Task: Retrieve salary from managers that have at least one corresponding entry in categories sharing the same level.
SQL: | SELECT salary FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "categories",
"outer_alias": "hac",
"inner_alias": "egiv",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19060 | train |
v3 | Schema:
requests (alias: ejof)(date, amount, level, status)
projects(salary, status, level, type)
Task: Find amount from requests where value exceeds the average salary from projects for the same level.
SQL: | SELECT amount FROM requests AS ejof
WHERE value > (
SELECT AVG(salary) FROM projects AS uliv
WHERE uliv.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "projects",
"outer_alias": "ejof",
"inner_alias": "uliv",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_19061 | train |
v3 | Schema:
tasks (alias: znob)(value, level, status, name)
departments(level, value, status, code)
Task: Retrieve code from tasks with value above the MAX(value) of departments rows sharing the same id.
SQL: | SELECT code FROM tasks AS znob
WHERE value > (
SELECT MAX(value) FROM departments AS dov
WHERE dov.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "departments",
"outer_alias": "znob",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_19062 | train |
v3 | Schema:
accounts (alias: jac)(level, code, salary, value)
managers(code, salary, level, name)
Task: Retrieve value from accounts with value above the MIN(salary) of managers rows sharing the same type.
SQL: | SELECT value FROM accounts AS jac
WHERE value > (
SELECT MIN(salary) FROM managers AS hac
WHERE hac.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "managers",
"outer_alias": "jac",
"inner_alias": "hac",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19063 | train |
v3 | Schema:
tasks (alias: znob)(salary, status, type, level)
invoices(type, id, code, name)
Task: Find value from tasks where value exceeds the total amount from invoices for the same id.
SQL: | SELECT value FROM tasks AS znob
WHERE value > (
SELECT SUM(amount) FROM invoices AS fal
WHERE fal.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "invoices",
"outer_alias": "znob",
"inner_alias": "fal",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_19064 | train |
v1 | Schema:
branches (alias: agov)(code, name, salary, value)
orders(value, date, type, code)
Task: Find name from branches where level appears in orders entries with matching status.
SQL: | SELECT name FROM branches AS agov
WHERE level IN (
SELECT level FROM orders AS kab
WHERE kab.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "orders",
"outer_alias": "agov",
"inner_alias": "kab",
"proj_col": "name",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_19065 | train |
v2 | Schema:
invoices (alias: fal)(salary, level, code, type)
branches(code, amount, level, status)
Task: Retrieve code from invoices that have at least one corresponding entry in branches sharing the same id.
SQL: | SELECT code 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": "code",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19066 | train |
v1 | Schema:
shipments (alias: vnob)(status, salary, id, amount)
invoices(name, level, date, value)
Task: Find amount from shipments where code appears in invoices entries with matching code.
SQL: | SELECT amount FROM shipments AS vnob
WHERE code IN (
SELECT code FROM invoices AS fal
WHERE fal.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "invoices",
"outer_alias": "vnob",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_19067 | train |
v1 | Schema:
accounts (alias: jac)(name, status, value, id)
staff(date, level, status, amount)
Task: Retrieve code from accounts whose type is found in staff rows where type matches the outer record.
SQL: | SELECT code FROM accounts AS jac
WHERE type IN (
SELECT type FROM staff AS xnob
WHERE xnob.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "staff",
"outer_alias": "jac",
"inner_alias": "xnob",
"proj_col": "code",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19068 | train |
v1 | Schema:
shipments (alias: vnob)(level, date, type, status)
managers(status, level, value, id)
Task: Retrieve value from shipments whose id is found in managers rows where status matches the outer record.
SQL: | SELECT value FROM shipments AS vnob
WHERE id IN (
SELECT id FROM managers AS hac
WHERE hac.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "managers",
"outer_alias": "vnob",
"inner_alias": "hac",
"proj_col": "value",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_19069 | train |
v3 | Schema:
customers (alias: lex)(name, salary, level, value)
managers(name, code, salary, status)
Task: Retrieve id from customers with value above the MIN(amount) of managers rows sharing the same type.
SQL: | SELECT id FROM customers AS lex
WHERE value > (
SELECT MIN(amount) FROM managers AS hac
WHERE hac.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "managers",
"outer_alias": "lex",
"inner_alias": "hac",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19070 | train |
v1 | Schema:
employees (alias: bev)(code, type, id, status)
transactions(status, level, code, id)
Task: Select salary from employees where status exists in transactions for the same status.
SQL: | SELECT salary FROM employees AS bev
WHERE status IN (
SELECT status FROM transactions AS gev
WHERE gev.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "transactions",
"outer_alias": "bev",
"inner_alias": "gev",
"proj_col": "salary",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19071 | train |
v2 | Schema:
projects (alias: uliv)(value, level, status, type)
customers(code, id, name, status)
Task: Find value from projects where a matching record exists in customers with the same level.
SQL: | SELECT value FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "customers",
"outer_alias": "uliv",
"inner_alias": "lex",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_19072 | train |
v2 | Schema:
managers (alias: hac)(salary, name, level, date)
transactions(type, date, amount, id)
Task: Find value from managers where a matching record exists in transactions with the same code.
SQL: | SELECT value FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "transactions",
"outer_alias": "hac",
"inner_alias": "gev",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19073 | train |
v3 | Schema:
regions (alias: okiv)(value, date, type, code)
projects(level, status, id, amount)
Task: Retrieve amount from regions with value above the MAX(salary) of projects rows sharing the same level.
SQL: | SELECT amount FROM regions AS okiv
WHERE value > (
SELECT MAX(salary) FROM projects AS uliv
WHERE uliv.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "projects",
"outer_alias": "okiv",
"inner_alias": "uliv",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_19074 | train |
v1 | Schema:
branches (alias: agov)(name, date, salary, value)
categories(id, amount, salary, date)
Task: Select salary from branches where level exists in categories for the same code.
SQL: | SELECT salary FROM branches AS agov
WHERE level IN (
SELECT level FROM categories AS egiv
WHERE egiv.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "categories",
"outer_alias": "agov",
"inner_alias": "egiv",
"proj_col": "salary",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_19075 | train |
v3 | Schema:
invoices (alias: fal)(code, type, id, value)
branches(status, id, code, amount)
Task: Retrieve amount from invoices with salary above the MIN(salary) of branches rows sharing the same status.
SQL: | SELECT amount FROM invoices AS fal
WHERE salary > (
SELECT MIN(salary) FROM branches AS agov
WHERE agov.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "branches",
"outer_alias": "fal",
"inner_alias": "agov",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19076 | train |
v2 | Schema:
categories (alias: egiv)(amount, value, salary, type)
projects(name, value, amount, salary)
Task: Retrieve amount from categories that have at least one corresponding entry in projects sharing the same type.
SQL: | SELECT amount FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "projects",
"outer_alias": "egiv",
"inner_alias": "uliv",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_19077 | train |
v1 | Schema:
products (alias: nad)(type, date, status, amount)
requests(code, status, salary, type)
Task: Retrieve id from products whose status is found in requests rows where id matches the outer record.
SQL: | SELECT id FROM products AS nad
WHERE status IN (
SELECT status FROM requests AS ejof
WHERE ejof.id = nad.id
); | {
"outer_table": "products",
"inner_table": "requests",
"outer_alias": "nad",
"inner_alias": "ejof",
"proj_col": "id",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19078 | train |
v1 | Schema:
staff (alias: xnob)(amount, level, value, salary)
departments(code, salary, level, status)
Task: Select code from staff where status exists in departments for the same status.
SQL: | SELECT code FROM staff AS xnob
WHERE status IN (
SELECT status FROM departments AS dov
WHERE dov.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "departments",
"outer_alias": "xnob",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_19079 | train |
v3 | Schema:
invoices (alias: fal)(code, salary, status, amount)
employees(status, value, id, amount)
Task: Find name from invoices where value exceeds the minimum value from employees for the same level.
SQL: | SELECT name FROM invoices AS fal
WHERE value > (
SELECT MIN(value) FROM employees AS bev
WHERE bev.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "employees",
"outer_alias": "fal",
"inner_alias": "bev",
"proj_col": "name",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19080 | train |
v2 | Schema:
employees (alias: bev)(value, code, type, name)
transactions(name, date, amount, salary)
Task: Retrieve code from employees that have at least one corresponding entry in transactions sharing the same id.
SQL: | SELECT code FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "transactions",
"outer_alias": "bev",
"inner_alias": "gev",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19081 | train |
v3 | Schema:
staff (alias: xnob)(salary, amount, name, value)
customers(amount, date, level, id)
Task: Find code from staff where value exceeds the average amount from customers for the same type.
SQL: | SELECT code FROM staff AS xnob
WHERE value > (
SELECT AVG(amount) FROM customers AS lex
WHERE lex.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "customers",
"outer_alias": "xnob",
"inner_alias": "lex",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_19082 | train |
v2 | Schema:
customers (alias: lex)(salary, amount, type, value)
sales(code, value, level, amount)
Task: Retrieve id from customers that have at least one corresponding entry in sales sharing the same id.
SQL: | SELECT id FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "sales",
"outer_alias": "lex",
"inner_alias": "cif",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19083 | train |
v1 | Schema:
staff (alias: xnob)(id, date, name, level)
requests(value, date, amount, status)
Task: Select salary from staff where type exists in requests for the same id.
SQL: | SELECT salary FROM staff AS xnob
WHERE type IN (
SELECT type FROM requests AS ejof
WHERE ejof.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "requests",
"outer_alias": "xnob",
"inner_alias": "ejof",
"proj_col": "salary",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_19084 | train |
v3 | Schema:
projects (alias: uliv)(date, value, level, id)
accounts(level, name, code, type)
Task: Find value from projects where amount exceeds the total value from accounts for the same type.
SQL: | SELECT value FROM projects AS uliv
WHERE amount > (
SELECT SUM(value) FROM accounts AS jac
WHERE jac.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "accounts",
"outer_alias": "uliv",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_19085 | train |
v1 | Schema:
items (alias: ikob)(status, value, type, amount)
invoices(date, code, amount, name)
Task: Find code from items where id appears in invoices entries with matching status.
SQL: | SELECT code FROM items AS ikob
WHERE id IN (
SELECT id FROM invoices AS fal
WHERE fal.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "invoices",
"outer_alias": "ikob",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_19086 | train |
v1 | Schema:
items (alias: ikob)(id, name, date, type)
accounts(level, value, name, status)
Task: Find value from items where id appears in accounts entries with matching level.
SQL: | SELECT value FROM items AS ikob
WHERE id IN (
SELECT id FROM accounts AS jac
WHERE jac.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "accounts",
"outer_alias": "ikob",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_19087 | train |
v1 | Schema:
departments (alias: dov)(code, type, name, level)
branches(id, value, code, date)
Task: Select amount from departments where code exists in branches for the same code.
SQL: | SELECT amount FROM departments AS dov
WHERE code IN (
SELECT code FROM branches AS agov
WHERE agov.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "branches",
"outer_alias": "dov",
"inner_alias": "agov",
"proj_col": "amount",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19088 | train |
v2 | Schema:
regions (alias: okiv)(name, value, status, type)
managers(date, id, value, level)
Task: Find value from regions where a matching record exists in managers with the same type.
SQL: | SELECT value FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "managers",
"outer_alias": "okiv",
"inner_alias": "hac",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_19089 | train |
v2 | Schema:
managers (alias: hac)(code, type, id, amount)
invoices(salary, status, id, type)
Task: Retrieve value from managers that have at least one corresponding entry in invoices sharing the same id.
SQL: | SELECT value FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "invoices",
"outer_alias": "hac",
"inner_alias": "fal",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19090 | train |
v1 | Schema:
managers (alias: hac)(value, level, code, id)
employees(date, code, status, name)
Task: Select value from managers where status exists in employees for the same level.
SQL: | SELECT value FROM managers AS hac
WHERE status IN (
SELECT status FROM employees AS bev
WHERE bev.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "employees",
"outer_alias": "hac",
"inner_alias": "bev",
"proj_col": "value",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19091 | train |
v3 | Schema:
invoices (alias: fal)(id, date, type, level)
transactions(code, date, level, status)
Task: Find name from invoices where salary exceeds the minimum value from transactions for the same status.
SQL: | SELECT name FROM invoices AS fal
WHERE salary > (
SELECT MIN(value) FROM transactions AS gev
WHERE gev.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "transactions",
"outer_alias": "fal",
"inner_alias": "gev",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19092 | train |
v2 | Schema:
sales (alias: cif)(level, value, status, name)
orders(name, salary, level, type)
Task: Retrieve value from sales that have at least one corresponding entry in orders sharing the same type.
SQL: | SELECT value FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "orders",
"outer_alias": "cif",
"inner_alias": "kab",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19093 | train |
v1 | Schema:
invoices (alias: fal)(id, code, status, type)
employees(type, salary, status, id)
Task: Find amount from invoices where type appears in employees entries with matching level.
SQL: | SELECT amount FROM invoices AS fal
WHERE type IN (
SELECT type FROM employees AS bev
WHERE bev.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "employees",
"outer_alias": "fal",
"inner_alias": "bev",
"proj_col": "amount",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19094 | train |
v3 | Schema:
schedules (alias: vmob)(name, value, date, amount)
transactions(name, status, level, amount)
Task: Find salary from schedules where value exceeds the total amount from transactions for the same type.
SQL: | SELECT salary FROM schedules AS vmob
WHERE value > (
SELECT SUM(amount) FROM transactions AS gev
WHERE gev.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "transactions",
"outer_alias": "vmob",
"inner_alias": "gev",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_19095 | train |
v2 | Schema:
shipments (alias: vnob)(amount, type, code, date)
customers(id, code, type, name)
Task: Find code from shipments where a matching record exists in customers with the same id.
SQL: | SELECT code FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "customers",
"outer_alias": "vnob",
"inner_alias": "lex",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_19096 | train |
v3 | Schema:
transactions (alias: gev)(code, level, salary, status)
requests(type, id, status, date)
Task: Find id from transactions where salary exceeds the average amount from requests for the same status.
SQL: | SELECT id FROM transactions AS gev
WHERE salary > (
SELECT AVG(amount) FROM requests AS ejof
WHERE ejof.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "requests",
"outer_alias": "gev",
"inner_alias": "ejof",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19097 | train |
v2 | Schema:
orders (alias: kab)(date, name, status, code)
departments(name, id, type, status)
Task: Retrieve salary from orders that have at least one corresponding entry in departments sharing the same level.
SQL: | SELECT salary FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "departments",
"outer_alias": "kab",
"inner_alias": "dov",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19098 | train |
v2 | Schema:
requests (alias: ejof)(amount, type, status, level)
staff(type, date, salary, level)
Task: Retrieve code from requests that have at least one corresponding entry in staff sharing the same type.
SQL: | SELECT code FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "staff",
"outer_alias": "ejof",
"inner_alias": "xnob",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_19099 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.