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:
items (alias: ikob)(type, code, id, value)
customers(date, level, code, id)
Task: Retrieve id from items that have at least one corresponding entry in customers sharing the same code.
SQL: | SELECT id FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "customers",
"outer_alias": "ikob",
"inner_alias": "lex",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_19100 | train |
v2 | Schema:
regions (alias: okiv)(amount, salary, status, value)
transactions(salary, name, level, code)
Task: Retrieve value from regions that have at least one corresponding entry in transactions sharing the same id.
SQL: | SELECT value FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "transactions",
"outer_alias": "okiv",
"inner_alias": "gev",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_19101 | train |
v3 | Schema:
customers (alias: lex)(salary, value, date, level)
schedules(id, date, status, type)
Task: Find id from customers where amount exceeds the total salary from schedules for the same id.
SQL: | SELECT id FROM customers AS lex
WHERE amount > (
SELECT SUM(salary) FROM schedules AS vmob
WHERE vmob.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "schedules",
"outer_alias": "lex",
"inner_alias": "vmob",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19102 | train |
v2 | Schema:
staff (alias: xnob)(type, date, level, name)
projects(amount, date, code, status)
Task: Find id from staff where a matching record exists in projects with the same status.
SQL: | SELECT id 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": "id",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_19103 | train |
v1 | Schema:
tasks (alias: znob)(salary, status, date, code)
employees(date, amount, type, salary)
Task: Find code from tasks where id appears in employees entries with matching id.
SQL: | SELECT code FROM tasks AS znob
WHERE id IN (
SELECT id FROM employees AS bev
WHERE bev.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "employees",
"outer_alias": "znob",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_19104 | train |
v2 | Schema:
customers (alias: lex)(status, salary, date, name)
sales(type, status, level, id)
Task: Retrieve name from customers that have at least one corresponding entry in sales sharing the same id.
SQL: | SELECT name 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": "name",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19105 | train |
v3 | Schema:
transactions (alias: gev)(level, type, value, status)
managers(name, value, type, amount)
Task: Find value from transactions where value exceeds the count of amount from managers for the same code.
SQL: | SELECT value FROM transactions AS gev
WHERE value > (
SELECT COUNT(amount) FROM managers AS hac
WHERE hac.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "managers",
"outer_alias": "gev",
"inner_alias": "hac",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19106 | train |
v1 | Schema:
products (alias: nad)(amount, value, name, id)
orders(amount, value, id, code)
Task: Select name from products where level exists in orders for the same status.
SQL: | SELECT name FROM products AS nad
WHERE level IN (
SELECT level FROM orders AS kab
WHERE kab.status = nad.status
); | {
"outer_table": "products",
"inner_table": "orders",
"outer_alias": "nad",
"inner_alias": "kab",
"proj_col": "name",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19107 | train |
v3 | Schema:
transactions (alias: gev)(status, code, amount, value)
tasks(salary, date, level, type)
Task: Find code from transactions where salary exceeds the total value from tasks for the same level.
SQL: | SELECT code FROM transactions AS gev
WHERE salary > (
SELECT SUM(value) FROM tasks AS znob
WHERE znob.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "tasks",
"outer_alias": "gev",
"inner_alias": "znob",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19108 | train |
v2 | Schema:
projects (alias: uliv)(id, date, type, level)
schedules(name, date, id, amount)
Task: Find id from projects where a matching record exists in schedules with the same code.
SQL: | SELECT id FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "schedules",
"outer_alias": "uliv",
"inner_alias": "vmob",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_19109 | train |
v2 | Schema:
items (alias: ikob)(status, code, name, value)
managers(code, salary, level, status)
Task: Find name from items where a matching record exists in managers with the same level.
SQL: | SELECT name FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "managers",
"outer_alias": "ikob",
"inner_alias": "hac",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_19110 | train |
v1 | Schema:
shipments (alias: vnob)(value, salary, id, amount)
departments(name, type, id, date)
Task: Retrieve name from shipments whose status is found in departments rows where id matches the outer record.
SQL: | SELECT name FROM shipments AS vnob
WHERE status IN (
SELECT status FROM departments AS dov
WHERE dov.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "departments",
"outer_alias": "vnob",
"inner_alias": "dov",
"proj_col": "name",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_19111 | train |
v1 | Schema:
orders (alias: kab)(name, type, level, amount)
invoices(level, amount, id, salary)
Task: Retrieve amount from orders whose level is found in invoices rows where code matches the outer record.
SQL: | SELECT amount FROM orders AS kab
WHERE level IN (
SELECT level FROM invoices AS fal
WHERE fal.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "invoices",
"outer_alias": "kab",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19112 | train |
v3 | Schema:
branches (alias: agov)(value, name, date, id)
products(name, id, amount, type)
Task: Retrieve code from branches with salary above the COUNT(value) of products rows sharing the same id.
SQL: | SELECT code FROM branches AS agov
WHERE salary > (
SELECT COUNT(value) FROM products AS nad
WHERE nad.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "products",
"outer_alias": "agov",
"inner_alias": "nad",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_19113 | train |
v2 | Schema:
tasks (alias: znob)(status, id, value, amount)
departments(type, salary, amount, level)
Task: Find value from tasks where a matching record exists in departments with the same code.
SQL: | SELECT value FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "departments",
"outer_alias": "znob",
"inner_alias": "dov",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_19114 | train |
v1 | Schema:
orders (alias: kab)(value, amount, salary, level)
departments(level, salary, status, name)
Task: Find code from orders where status appears in departments entries with matching id.
SQL: | SELECT code FROM orders AS kab
WHERE status IN (
SELECT status FROM departments AS dov
WHERE dov.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "departments",
"outer_alias": "kab",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19115 | train |
v1 | Schema:
departments (alias: dov)(code, status, value, salary)
schedules(date, level, status, amount)
Task: Retrieve salary from departments whose id is found in schedules rows where level matches the outer record.
SQL: | SELECT salary FROM departments AS dov
WHERE id IN (
SELECT id FROM schedules AS vmob
WHERE vmob.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "schedules",
"outer_alias": "dov",
"inner_alias": "vmob",
"proj_col": "salary",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19116 | train |
v1 | Schema:
products (alias: nad)(name, salary, status, date)
regions(level, code, amount, value)
Task: Find id from products where id appears in regions entries with matching type.
SQL: | SELECT id FROM products AS nad
WHERE id IN (
SELECT id FROM regions AS okiv
WHERE okiv.type = nad.type
); | {
"outer_table": "products",
"inner_table": "regions",
"outer_alias": "nad",
"inner_alias": "okiv",
"proj_col": "id",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19117 | train |
v3 | Schema:
items (alias: ikob)(code, name, id, date)
managers(date, salary, name, level)
Task: Retrieve code from items with value above the AVG(salary) of managers rows sharing the same level.
SQL: | SELECT code FROM items AS ikob
WHERE value > (
SELECT AVG(salary) FROM managers AS hac
WHERE hac.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "managers",
"outer_alias": "ikob",
"inner_alias": "hac",
"proj_col": "code",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_19118 | train |
v3 | Schema:
branches (alias: agov)(amount, salary, id, level)
accounts(value, name, date, salary)
Task: Retrieve id from branches with amount above the SUM(value) of accounts rows sharing the same status.
SQL: | SELECT id FROM branches AS agov
WHERE amount > (
SELECT SUM(value) FROM accounts AS jac
WHERE jac.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "accounts",
"outer_alias": "agov",
"inner_alias": "jac",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_19119 | train |
v1 | Schema:
sales (alias: cif)(status, value, id, salary)
items(level, salary, amount, type)
Task: Retrieve value from sales whose code is found in items rows where code matches the outer record.
SQL: | SELECT value FROM sales AS cif
WHERE code IN (
SELECT code FROM items AS ikob
WHERE ikob.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "items",
"outer_alias": "cif",
"inner_alias": "ikob",
"proj_col": "value",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19120 | train |
v3 | Schema:
orders (alias: kab)(salary, level, code, id)
staff(level, code, name, id)
Task: Retrieve amount from orders with salary above the MAX(amount) of staff rows sharing the same id.
SQL: | SELECT amount FROM orders AS kab
WHERE salary > (
SELECT MAX(amount) FROM staff AS xnob
WHERE xnob.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "staff",
"outer_alias": "kab",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19121 | train |
v3 | Schema:
sales (alias: cif)(amount, id, type, date)
employees(date, amount, status, type)
Task: Retrieve code from sales with salary above the MAX(salary) of employees rows sharing the same status.
SQL: | SELECT code FROM sales AS cif
WHERE salary > (
SELECT MAX(salary) FROM employees AS bev
WHERE bev.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "employees",
"outer_alias": "cif",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19122 | train |
v1 | Schema:
categories (alias: egiv)(code, level, salary, date)
tasks(amount, id, date, name)
Task: Retrieve salary from categories whose status is found in tasks rows where code matches the outer record.
SQL: | SELECT salary FROM categories AS egiv
WHERE status IN (
SELECT status FROM tasks AS znob
WHERE znob.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "tasks",
"outer_alias": "egiv",
"inner_alias": "znob",
"proj_col": "salary",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_19123 | train |
v2 | Schema:
orders (alias: kab)(salary, name, type, value)
transactions(amount, value, status, salary)
Task: Find id from orders where a matching record exists in transactions with the same status.
SQL: | SELECT id FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "transactions",
"outer_alias": "kab",
"inner_alias": "gev",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19124 | train |
v1 | Schema:
tasks (alias: znob)(value, level, salary, code)
customers(type, id, name, amount)
Task: Find id from tasks where id appears in customers entries with matching type.
SQL: | SELECT id FROM tasks AS znob
WHERE id IN (
SELECT id FROM customers AS lex
WHERE lex.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "customers",
"outer_alias": "znob",
"inner_alias": "lex",
"proj_col": "id",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_19125 | train |
v1 | Schema:
products (alias: nad)(value, date, amount, code)
projects(date, salary, code, value)
Task: Select amount from products where status exists in projects for the same id.
SQL: | SELECT amount FROM products AS nad
WHERE status IN (
SELECT status FROM projects AS uliv
WHERE uliv.id = nad.id
); | {
"outer_table": "products",
"inner_table": "projects",
"outer_alias": "nad",
"inner_alias": "uliv",
"proj_col": "amount",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19126 | train |
v3 | Schema:
requests (alias: ejof)(salary, level, amount, name)
invoices(level, salary, amount, code)
Task: Find salary from requests where value exceeds the maximum salary from invoices for the same level.
SQL: | SELECT salary FROM requests AS ejof
WHERE value > (
SELECT MAX(salary) FROM invoices AS fal
WHERE fal.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "invoices",
"outer_alias": "ejof",
"inner_alias": "fal",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_19127 | train |
v3 | Schema:
projects (alias: uliv)(date, amount, status, value)
orders(level, value, type, status)
Task: Retrieve value from projects with salary above the SUM(amount) of orders rows sharing the same code.
SQL: | SELECT value FROM projects AS uliv
WHERE salary > (
SELECT SUM(amount) FROM orders AS kab
WHERE kab.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "orders",
"outer_alias": "uliv",
"inner_alias": "kab",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_19128 | train |
v2 | Schema:
managers (alias: hac)(level, salary, status, type)
items(value, salary, amount, status)
Task: Find amount from managers where a matching record exists in items with the same status.
SQL: | SELECT amount FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "items",
"outer_alias": "hac",
"inner_alias": "ikob",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19129 | train |
v2 | Schema:
customers (alias: lex)(level, date, name, code)
tasks(date, amount, name, status)
Task: Retrieve id from customers that have at least one corresponding entry in tasks sharing the same type.
SQL: | SELECT id FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "tasks",
"outer_alias": "lex",
"inner_alias": "znob",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19130 | train |
v1 | Schema:
staff (alias: xnob)(level, value, name, status)
accounts(level, type, salary, amount)
Task: Select code from staff where id exists in accounts for the same type.
SQL: | SELECT code FROM staff AS xnob
WHERE id IN (
SELECT id FROM accounts AS jac
WHERE jac.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "accounts",
"outer_alias": "xnob",
"inner_alias": "jac",
"proj_col": "code",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_19131 | train |
v3 | Schema:
managers (alias: hac)(status, type, code, id)
accounts(status, amount, salary, level)
Task: Retrieve amount from managers with salary above the MIN(value) of accounts rows sharing the same status.
SQL: | SELECT amount FROM managers AS hac
WHERE salary > (
SELECT MIN(value) FROM accounts AS jac
WHERE jac.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "accounts",
"outer_alias": "hac",
"inner_alias": "jac",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19132 | train |
v2 | Schema:
departments (alias: dov)(id, amount, type, status)
orders(level, amount, value, type)
Task: Retrieve name from departments that have at least one corresponding entry in orders sharing the same id.
SQL: | SELECT name FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "orders",
"outer_alias": "dov",
"inner_alias": "kab",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19133 | train |
v1 | Schema:
products (alias: nad)(id, status, salary, date)
categories(date, level, salary, status)
Task: Retrieve salary from products whose status is found in categories rows where id matches the outer record.
SQL: | SELECT salary FROM products AS nad
WHERE status IN (
SELECT status FROM categories AS egiv
WHERE egiv.id = nad.id
); | {
"outer_table": "products",
"inner_table": "categories",
"outer_alias": "nad",
"inner_alias": "egiv",
"proj_col": "salary",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19134 | train |
v1 | Schema:
orders (alias: kab)(id, name, salary, value)
projects(level, status, name, value)
Task: Find salary from orders where type appears in projects entries with matching id.
SQL: | SELECT salary FROM orders AS kab
WHERE type IN (
SELECT type FROM projects AS uliv
WHERE uliv.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "projects",
"outer_alias": "kab",
"inner_alias": "uliv",
"proj_col": "salary",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19135 | train |
v1 | Schema:
requests (alias: ejof)(name, code, value, status)
sales(amount, status, id, salary)
Task: Retrieve code from requests whose id is found in sales rows where code matches the outer record.
SQL: | SELECT code FROM requests AS ejof
WHERE id IN (
SELECT id FROM sales AS cif
WHERE cif.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "sales",
"outer_alias": "ejof",
"inner_alias": "cif",
"proj_col": "code",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_19136 | train |
v2 | Schema:
requests (alias: ejof)(level, type, name, id)
transactions(level, date, value, type)
Task: Find code from requests where a matching record exists in transactions with the same level.
SQL: | SELECT code FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "transactions",
"outer_alias": "ejof",
"inner_alias": "gev",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_19137 | train |
v2 | Schema:
managers (alias: hac)(id, code, date, name)
tasks(name, status, code, amount)
Task: Find value from managers where a matching record exists in tasks with the same status.
SQL: | SELECT value FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "tasks",
"outer_alias": "hac",
"inner_alias": "znob",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19138 | train |
v2 | Schema:
requests (alias: ejof)(type, date, salary, amount)
departments(level, salary, name, date)
Task: Find id from requests where a matching record exists in departments with the same level.
SQL: | SELECT id FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "departments",
"outer_alias": "ejof",
"inner_alias": "dov",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_19139 | train |
v2 | Schema:
projects (alias: uliv)(status, code, amount, salary)
tasks(status, name, date, level)
Task: Retrieve amount from projects that have at least one corresponding entry in tasks sharing the same level.
SQL: | SELECT amount FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "tasks",
"outer_alias": "uliv",
"inner_alias": "znob",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_19140 | train |
v2 | Schema:
products (alias: nad)(status, code, date, type)
tasks(amount, type, level, code)
Task: Retrieve id from products that have at least one corresponding entry in tasks sharing the same type.
SQL: | SELECT id FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.type = nad.type
); | {
"outer_table": "products",
"inner_table": "tasks",
"outer_alias": "nad",
"inner_alias": "znob",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19141 | train |
v3 | Schema:
requests (alias: ejof)(id, type, code, amount)
schedules(date, value, level, salary)
Task: Retrieve value from requests with amount above the COUNT(value) of schedules rows sharing the same type.
SQL: | SELECT value FROM requests AS ejof
WHERE amount > (
SELECT COUNT(value) FROM schedules AS vmob
WHERE vmob.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "schedules",
"outer_alias": "ejof",
"inner_alias": "vmob",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_19142 | train |
v2 | Schema:
invoices (alias: fal)(value, level, type, code)
staff(name, id, value, status)
Task: Retrieve id from invoices that have at least one corresponding entry in staff sharing the same level.
SQL: | SELECT id FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "staff",
"outer_alias": "fal",
"inner_alias": "xnob",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19143 | train |
v3 | Schema:
orders (alias: kab)(level, name, code, status)
branches(date, code, salary, id)
Task: Find id from orders where value exceeds the average amount from branches for the same code.
SQL: | SELECT id FROM orders AS kab
WHERE value > (
SELECT AVG(amount) FROM branches AS agov
WHERE agov.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "branches",
"outer_alias": "kab",
"inner_alias": "agov",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19144 | train |
v3 | Schema:
departments (alias: dov)(id, status, code, type)
items(level, code, type, name)
Task: Find value from departments where salary exceeds the average salary from items for the same status.
SQL: | SELECT value FROM departments AS dov
WHERE salary > (
SELECT AVG(salary) FROM items AS ikob
WHERE ikob.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "items",
"outer_alias": "dov",
"inner_alias": "ikob",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19145 | train |
v3 | Schema:
products (alias: nad)(id, amount, status, type)
managers(id, type, name, date)
Task: Find salary from products where salary exceeds the minimum value from managers for the same level.
SQL: | SELECT salary FROM products AS nad
WHERE salary > (
SELECT MIN(value) FROM managers AS hac
WHERE hac.level = nad.level
); | {
"outer_table": "products",
"inner_table": "managers",
"outer_alias": "nad",
"inner_alias": "hac",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19146 | train |
v3 | Schema:
orders (alias: kab)(value, name, code, salary)
employees(status, date, name, value)
Task: Retrieve salary from orders with value above the MAX(salary) of employees rows sharing the same code.
SQL: | SELECT salary FROM orders AS kab
WHERE value > (
SELECT MAX(salary) FROM employees AS bev
WHERE bev.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "employees",
"outer_alias": "kab",
"inner_alias": "bev",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19147 | train |
v2 | Schema:
sales (alias: cif)(date, code, id, name)
branches(salary, name, type, status)
Task: Find amount from sales where a matching record exists in branches with the same status.
SQL: | SELECT amount FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "branches",
"outer_alias": "cif",
"inner_alias": "agov",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19148 | train |
v2 | Schema:
departments (alias: dov)(value, code, type, amount)
employees(salary, amount, level, name)
Task: Find name from departments where a matching record exists in employees with the same status.
SQL: | SELECT name FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "employees",
"outer_alias": "dov",
"inner_alias": "bev",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19149 | train |
v2 | Schema:
accounts (alias: jac)(status, amount, level, name)
regions(value, id, name, amount)
Task: Retrieve code from accounts that have at least one corresponding entry in regions sharing the same code.
SQL: | SELECT code FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "regions",
"outer_alias": "jac",
"inner_alias": "okiv",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19150 | train |
v3 | Schema:
tasks (alias: znob)(code, status, level, name)
orders(amount, value, name, type)
Task: Retrieve id from tasks with salary above the SUM(value) of orders rows sharing the same type.
SQL: | SELECT id FROM tasks AS znob
WHERE salary > (
SELECT SUM(value) FROM orders AS kab
WHERE kab.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "orders",
"outer_alias": "znob",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_19151 | train |
v2 | Schema:
requests (alias: ejof)(status, code, amount, type)
tasks(name, type, id, value)
Task: Find code from requests where a matching record exists in tasks with the same status.
SQL: | SELECT code FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "tasks",
"outer_alias": "ejof",
"inner_alias": "znob",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_19152 | train |
v1 | Schema:
branches (alias: agov)(date, amount, status, value)
categories(code, date, amount, status)
Task: Find name from branches where code appears in categories entries with matching id.
SQL: | SELECT name FROM branches AS agov
WHERE code IN (
SELECT code FROM categories AS egiv
WHERE egiv.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "categories",
"outer_alias": "agov",
"inner_alias": "egiv",
"proj_col": "name",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_19153 | train |
v3 | Schema:
staff (alias: xnob)(type, date, id, value)
projects(amount, salary, value, name)
Task: Retrieve id from staff with value above the MIN(salary) of projects rows sharing the same id.
SQL: | SELECT id FROM staff AS xnob
WHERE value > (
SELECT MIN(salary) 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": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_19154 | train |
v3 | Schema:
departments (alias: dov)(status, date, amount, level)
shipments(status, value, level, type)
Task: Find salary from departments where value exceeds the average amount from shipments for the same status.
SQL: | SELECT salary FROM departments AS dov
WHERE value > (
SELECT AVG(amount) FROM shipments AS vnob
WHERE vnob.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "shipments",
"outer_alias": "dov",
"inner_alias": "vnob",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19155 | train |
v3 | Schema:
requests (alias: ejof)(status, amount, id, code)
managers(type, date, status, code)
Task: Retrieve id from requests with amount above the AVG(value) of managers rows sharing the same type.
SQL: | SELECT id FROM requests AS ejof
WHERE amount > (
SELECT AVG(value) FROM managers AS hac
WHERE hac.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "managers",
"outer_alias": "ejof",
"inner_alias": "hac",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_19156 | train |
v1 | Schema:
transactions (alias: gev)(amount, status, level, code)
products(name, salary, level, value)
Task: Select salary from transactions where code exists in products for the same type.
SQL: | SELECT salary FROM transactions AS gev
WHERE code IN (
SELECT code FROM products AS nad
WHERE nad.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "products",
"outer_alias": "gev",
"inner_alias": "nad",
"proj_col": "salary",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19157 | train |
v1 | Schema:
staff (alias: xnob)(code, type, name, status)
departments(code, name, date, id)
Task: Select value from staff where id exists in departments for the same id.
SQL: | SELECT value FROM staff AS xnob
WHERE id IN (
SELECT id FROM departments AS dov
WHERE dov.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "departments",
"outer_alias": "xnob",
"inner_alias": "dov",
"proj_col": "value",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_19158 | train |
v3 | Schema:
projects (alias: uliv)(date, status, salary, type)
products(date, type, amount, status)
Task: Find name from projects where salary exceeds the maximum amount from products for the same status.
SQL: | SELECT name FROM projects AS uliv
WHERE salary > (
SELECT MAX(amount) FROM products AS nad
WHERE nad.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "products",
"outer_alias": "uliv",
"inner_alias": "nad",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_19159 | train |
v2 | Schema:
sales (alias: cif)(level, salary, value, amount)
transactions(id, type, date, salary)
Task: Retrieve salary from sales that have at least one corresponding entry in transactions sharing the same type.
SQL: | SELECT salary FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "transactions",
"outer_alias": "cif",
"inner_alias": "gev",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19160 | train |
v1 | Schema:
products (alias: nad)(name, level, value, type)
orders(status, type, salary, level)
Task: Find name from products where status appears in orders entries with matching level.
SQL: | SELECT name FROM products AS nad
WHERE status IN (
SELECT status FROM orders AS kab
WHERE kab.level = nad.level
); | {
"outer_table": "products",
"inner_table": "orders",
"outer_alias": "nad",
"inner_alias": "kab",
"proj_col": "name",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19161 | train |
v3 | Schema:
categories (alias: egiv)(id, date, salary, code)
branches(id, type, status, value)
Task: Find salary from categories where amount exceeds the average value from branches for the same status.
SQL: | SELECT salary FROM categories AS egiv
WHERE amount > (
SELECT AVG(value) FROM branches AS agov
WHERE agov.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "branches",
"outer_alias": "egiv",
"inner_alias": "agov",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_19162 | train |
v1 | Schema:
requests (alias: ejof)(salary, date, id, amount)
customers(type, amount, date, name)
Task: Select name from requests where type exists in customers for the same status.
SQL: | SELECT name FROM requests AS ejof
WHERE type IN (
SELECT type FROM customers AS lex
WHERE lex.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "customers",
"outer_alias": "ejof",
"inner_alias": "lex",
"proj_col": "name",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_19163 | train |
v1 | Schema:
invoices (alias: fal)(code, salary, type, level)
shipments(name, date, value, amount)
Task: Select amount from invoices where type exists in shipments for the same id.
SQL: | SELECT amount FROM invoices AS fal
WHERE type IN (
SELECT type FROM shipments AS vnob
WHERE vnob.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "shipments",
"outer_alias": "fal",
"inner_alias": "vnob",
"proj_col": "amount",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19164 | train |
v3 | Schema:
requests (alias: ejof)(value, amount, date, level)
invoices(type, status, date, level)
Task: Find value from requests where salary exceeds the minimum salary from invoices for the same code.
SQL: | SELECT value FROM requests AS ejof
WHERE salary > (
SELECT MIN(salary) FROM invoices AS fal
WHERE fal.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "invoices",
"outer_alias": "ejof",
"inner_alias": "fal",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_19165 | train |
v1 | Schema:
invoices (alias: fal)(amount, salary, date, status)
shipments(date, status, value, amount)
Task: Select value from invoices where level exists in shipments for the same level.
SQL: | SELECT value FROM invoices AS fal
WHERE level IN (
SELECT level FROM shipments AS vnob
WHERE vnob.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "shipments",
"outer_alias": "fal",
"inner_alias": "vnob",
"proj_col": "value",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19166 | train |
v2 | Schema:
invoices (alias: fal)(code, status, id, name)
departments(amount, level, value, status)
Task: Find value from invoices where a matching record exists in departments with the same level.
SQL: | SELECT value FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "departments",
"outer_alias": "fal",
"inner_alias": "dov",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19167 | train |
v2 | Schema:
categories (alias: egiv)(date, status, level, value)
orders(value, name, type, id)
Task: Find salary from categories where a matching record exists in orders with the same level.
SQL: | SELECT salary FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "orders",
"outer_alias": "egiv",
"inner_alias": "kab",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_19168 | train |
v2 | Schema:
orders (alias: kab)(value, name, type, code)
shipments(level, salary, type, amount)
Task: Find value from orders where a matching record exists in shipments with the same id.
SQL: | SELECT value FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "shipments",
"outer_alias": "kab",
"inner_alias": "vnob",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19169 | train |
v1 | Schema:
managers (alias: hac)(salary, name, level, id)
products(name, id, salary, date)
Task: Find salary from managers where status appears in products entries with matching id.
SQL: | SELECT salary FROM managers AS hac
WHERE status IN (
SELECT status FROM products AS nad
WHERE nad.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "products",
"outer_alias": "hac",
"inner_alias": "nad",
"proj_col": "salary",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19170 | train |
v2 | Schema:
products (alias: nad)(code, date, amount, salary)
staff(code, date, type, name)
Task: Find salary from products where a matching record exists in staff with the same status.
SQL: | SELECT salary FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.status = nad.status
); | {
"outer_table": "products",
"inner_table": "staff",
"outer_alias": "nad",
"inner_alias": "xnob",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19171 | train |
v2 | Schema:
categories (alias: egiv)(amount, code, type, name)
invoices(status, type, level, name)
Task: Find id from categories where a matching record exists in invoices with the same status.
SQL: | SELECT id FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "invoices",
"outer_alias": "egiv",
"inner_alias": "fal",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_19172 | train |
v2 | Schema:
regions (alias: okiv)(salary, name, date, type)
requests(code, status, salary, value)
Task: Find id from regions where a matching record exists in requests with the same code.
SQL: | SELECT id FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "requests",
"outer_alias": "okiv",
"inner_alias": "ejof",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_19173 | train |
v2 | Schema:
managers (alias: hac)(date, type, salary, code)
transactions(amount, value, id, salary)
Task: Find code from managers where a matching record exists in transactions with the same code.
SQL: | SELECT code 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": "code",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19174 | train |
v1 | Schema:
employees (alias: bev)(name, level, salary, id)
categories(amount, type, value, date)
Task: Find id from employees where id appears in categories entries with matching status.
SQL: | SELECT id FROM employees AS bev
WHERE id IN (
SELECT id FROM categories AS egiv
WHERE egiv.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "categories",
"outer_alias": "bev",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19175 | train |
v2 | Schema:
products (alias: nad)(salary, code, name, type)
transactions(level, type, id, salary)
Task: Find id from products where a matching record exists in transactions with the same type.
SQL: | SELECT id FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.type = nad.type
); | {
"outer_table": "products",
"inner_table": "transactions",
"outer_alias": "nad",
"inner_alias": "gev",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19176 | train |
v1 | Schema:
projects (alias: uliv)(salary, date, level, type)
tasks(id, value, status, salary)
Task: Retrieve salary from projects whose type is found in tasks rows where code matches the outer record.
SQL: | SELECT salary FROM projects AS uliv
WHERE type IN (
SELECT type FROM tasks AS znob
WHERE znob.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "tasks",
"outer_alias": "uliv",
"inner_alias": "znob",
"proj_col": "salary",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_19177 | train |
v2 | Schema:
orders (alias: kab)(id, level, value, amount)
categories(value, amount, date, status)
Task: Find id from orders where a matching record exists in categories with the same type.
SQL: | SELECT id FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "categories",
"outer_alias": "kab",
"inner_alias": "egiv",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19178 | train |
v1 | Schema:
regions (alias: okiv)(code, date, name, value)
departments(salary, type, value, date)
Task: Find name from regions where id appears in departments entries with matching status.
SQL: | SELECT name FROM regions AS okiv
WHERE id IN (
SELECT id FROM departments AS dov
WHERE dov.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "departments",
"outer_alias": "okiv",
"inner_alias": "dov",
"proj_col": "name",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_19179 | train |
v2 | Schema:
staff (alias: xnob)(salary, date, amount, name)
items(id, status, code, level)
Task: Retrieve value from staff that have at least one corresponding entry in items sharing the same type.
SQL: | SELECT value FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "items",
"outer_alias": "xnob",
"inner_alias": "ikob",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_19180 | train |
v3 | Schema:
accounts (alias: jac)(code, amount, value, level)
transactions(name, salary, status, code)
Task: Find value from accounts where salary exceeds the minimum value from transactions for the same code.
SQL: | SELECT value FROM accounts AS jac
WHERE salary > (
SELECT MIN(value) FROM transactions AS gev
WHERE gev.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "transactions",
"outer_alias": "jac",
"inner_alias": "gev",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19181 | train |
v1 | Schema:
tasks (alias: znob)(code, salary, date, amount)
staff(date, id, status, type)
Task: Retrieve value from tasks whose level is found in staff rows where code matches the outer record.
SQL: | SELECT value FROM tasks AS znob
WHERE level IN (
SELECT level FROM staff AS xnob
WHERE xnob.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "staff",
"outer_alias": "znob",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_19182 | train |
v3 | Schema:
employees (alias: bev)(status, amount, salary, date)
regions(status, type, value, id)
Task: Retrieve salary from employees with amount above the COUNT(value) of regions rows sharing the same id.
SQL: | SELECT salary FROM employees AS bev
WHERE amount > (
SELECT COUNT(value) FROM regions AS okiv
WHERE okiv.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "regions",
"outer_alias": "bev",
"inner_alias": "okiv",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19183 | train |
v1 | Schema:
shipments (alias: vnob)(status, code, salary, date)
schedules(amount, id, salary, type)
Task: Retrieve code from shipments whose status is found in schedules rows where level matches the outer record.
SQL: | SELECT code FROM shipments AS vnob
WHERE status IN (
SELECT status FROM schedules AS vmob
WHERE vmob.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "schedules",
"outer_alias": "vnob",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_19184 | train |
v3 | Schema:
orders (alias: kab)(type, status, name, value)
staff(salary, amount, value, level)
Task: Retrieve salary from orders with value above the AVG(value) of staff rows sharing the same code.
SQL: | SELECT salary FROM orders AS kab
WHERE value > (
SELECT AVG(value) FROM staff AS xnob
WHERE xnob.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "staff",
"outer_alias": "kab",
"inner_alias": "xnob",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19185 | train |
v2 | Schema:
orders (alias: kab)(amount, status, code, salary)
departments(salary, name, level, amount)
Task: Retrieve salary from orders that have at least one corresponding entry in departments sharing the same status.
SQL: | SELECT salary FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "departments",
"outer_alias": "kab",
"inner_alias": "dov",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19186 | train |
v1 | Schema:
invoices (alias: fal)(salary, level, value, date)
regions(name, code, amount, salary)
Task: Find amount from invoices where code appears in regions entries with matching id.
SQL: | SELECT amount FROM invoices AS fal
WHERE code IN (
SELECT code FROM regions AS okiv
WHERE okiv.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "regions",
"outer_alias": "fal",
"inner_alias": "okiv",
"proj_col": "amount",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19187 | train |
v1 | Schema:
sales (alias: cif)(salary, name, id, value)
categories(amount, type, level, name)
Task: Select amount from sales where code exists in categories for the same id.
SQL: | SELECT amount FROM sales AS cif
WHERE code IN (
SELECT code FROM categories AS egiv
WHERE egiv.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "categories",
"outer_alias": "cif",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19188 | train |
v1 | Schema:
sales (alias: cif)(value, amount, date, status)
projects(amount, date, name, id)
Task: Select name from sales where status exists in projects for the same code.
SQL: | SELECT name FROM sales AS cif
WHERE status IN (
SELECT status FROM projects AS uliv
WHERE uliv.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "projects",
"outer_alias": "cif",
"inner_alias": "uliv",
"proj_col": "name",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19189 | train |
v2 | Schema:
regions (alias: okiv)(salary, value, code, id)
orders(code, status, level, salary)
Task: Retrieve name from regions that have at least one corresponding entry in orders sharing the same type.
SQL: | SELECT name FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "orders",
"outer_alias": "okiv",
"inner_alias": "kab",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_19190 | train |
v3 | Schema:
departments (alias: dov)(code, id, name, status)
sales(status, name, code, amount)
Task: Retrieve salary from departments with value above the COUNT(salary) of sales rows sharing the same id.
SQL: | SELECT salary FROM departments AS dov
WHERE value > (
SELECT COUNT(salary) FROM sales AS cif
WHERE cif.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "sales",
"outer_alias": "dov",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19191 | train |
v2 | Schema:
staff (alias: xnob)(date, id, type, name)
schedules(date, value, type, status)
Task: Find salary from staff where a matching record exists in schedules with the same status.
SQL: | SELECT salary FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "schedules",
"outer_alias": "xnob",
"inner_alias": "vmob",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_19192 | train |
v2 | Schema:
invoices (alias: fal)(code, id, amount, level)
employees(type, code, name, level)
Task: Retrieve id from invoices that have at least one corresponding entry in employees sharing the same id.
SQL: | SELECT id FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "employees",
"outer_alias": "fal",
"inner_alias": "bev",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19193 | train |
v3 | Schema:
transactions (alias: gev)(status, type, amount, value)
items(name, amount, code, value)
Task: Retrieve salary from transactions with salary above the MIN(amount) of items rows sharing the same status.
SQL: | SELECT salary FROM transactions AS gev
WHERE salary > (
SELECT MIN(amount) FROM items AS ikob
WHERE ikob.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "items",
"outer_alias": "gev",
"inner_alias": "ikob",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19194 | train |
v2 | Schema:
orders (alias: kab)(code, id, status, level)
tasks(date, level, amount, type)
Task: Find salary from orders where a matching record exists in tasks with the same id.
SQL: | SELECT salary FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "tasks",
"outer_alias": "kab",
"inner_alias": "znob",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19195 | train |
v2 | Schema:
customers (alias: lex)(code, level, name, id)
schedules(level, name, type, code)
Task: Retrieve id from customers that have at least one corresponding entry in schedules sharing the same id.
SQL: | SELECT id FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "schedules",
"outer_alias": "lex",
"inner_alias": "vmob",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19196 | train |
v2 | Schema:
products (alias: nad)(name, type, date, salary)
sales(type, salary, date, status)
Task: Find salary from products where a matching record exists in sales with the same code.
SQL: | SELECT salary FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.code = nad.code
); | {
"outer_table": "products",
"inner_table": "sales",
"outer_alias": "nad",
"inner_alias": "cif",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19197 | train |
v3 | Schema:
employees (alias: bev)(code, level, name, date)
orders(amount, value, level, id)
Task: Retrieve id from employees with value above the MAX(amount) of orders rows sharing the same id.
SQL: | SELECT id FROM employees AS bev
WHERE value > (
SELECT MAX(amount) FROM orders AS kab
WHERE kab.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "orders",
"outer_alias": "bev",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19198 | train |
v3 | Schema:
invoices (alias: fal)(type, value, date, code)
customers(status, level, id, name)
Task: Find code from invoices where value exceeds the average amount from customers for the same type.
SQL: | SELECT code FROM invoices AS fal
WHERE value > (
SELECT AVG(amount) FROM customers AS lex
WHERE lex.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "customers",
"outer_alias": "fal",
"inner_alias": "lex",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_19199 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.