variant stringclasses 3
values | prompt stringlengths 162 235 | sql stringlengths 103 144 | metadata unknown | token_group stringclasses 2
values | id stringlengths 23 23 | split stringclasses 1
value |
|---|---|---|---|---|---|---|
v2 | Schema:
employees (alias: bev)(code, level, value, salary)
orders(amount, code, value, name)
Task: Find salary from employees where a matching record exists in orders with the same id.
SQL: | SELECT salary FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM orders AS lex
WHERE lex.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "orders",
"outer_alias": "bev",
"inner_alias": "lex",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00000 | train |
v1 | Schema:
customers (alias: lex)(amount, salary, type, value)
staff(id, salary, type, status)
Task: Retrieve value from customers whose status is found in staff rows where level matches the outer record.
SQL: | SELECT value FROM customers AS lex
WHERE status IN (
SELECT status FROM staff AS cif
WHERE cif.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "staff",
"outer_alias": "lex",
"inner_alias": "cif",
"proj_col": "value",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00001 | train |
v3 | Schema:
requests (alias: ejof)(code, id, level, status)
departments(id, type, salary, date)
Task: Find value from requests where salary exceeds the count of value from departments for the same code.
SQL: | SELECT value FROM requests AS ejof
WHERE salary > (
SELECT COUNT(value) FROM departments AS gev
WHERE gev.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "departments",
"outer_alias": "ejof",
"inner_alias": "gev",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_rand_v1_train_00002 | train |
v2 | Schema:
products (alias: nad)(salary, code, date, status)
regions(value, amount, code, level)
Task: Retrieve value from products that have at least one corresponding entry in regions sharing the same code.
SQL: | SELECT value FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM regions AS lex
WHERE lex.code = nad.code
); | {
"outer_table": "products",
"inner_table": "regions",
"outer_alias": "nad",
"inner_alias": "lex",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00003 | train |
v1 | Schema:
orders (alias: kab)(value, level, code, type)
shipments(amount, status, code, id)
Task: Find name from orders where type appears in shipments entries with matching code.
SQL: | SELECT name FROM orders AS kab
WHERE type IN (
SELECT type FROM shipments AS uliv
WHERE uliv.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "shipments",
"outer_alias": "kab",
"inner_alias": "uliv",
"proj_col": "name",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00004 | train |
v3 | Schema:
projects (alias: uliv)(status, amount, level, value)
orders(code, type, status, value)
Task: Find value from projects where salary exceeds the count of amount from orders for the same id.
SQL: | SELECT value FROM projects AS uliv
WHERE salary > (
SELECT COUNT(amount) FROM orders AS xnob
WHERE xnob.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "orders",
"outer_alias": "uliv",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_rand_v1_train_00005 | train |
v2 | Schema:
sales (alias: cif)(code, id, level, value)
projects(amount, name, date, id)
Task: Retrieve id from sales that have at least one corresponding entry in projects sharing the same code.
SQL: | SELECT id FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM projects AS jac
WHERE jac.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "projects",
"outer_alias": "cif",
"inner_alias": "jac",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00006 | train |
v2 | Schema:
shipments (alias: vnob)(level, status, type, value)
products(id, amount, level, type)
Task: Retrieve code from shipments that have at least one corresponding entry in products sharing the same status.
SQL: | SELECT code FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM products AS hac
WHERE hac.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "products",
"outer_alias": "vnob",
"inner_alias": "hac",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_rand_v1_train_00007 | train |
v2 | Schema:
orders (alias: kab)(value, amount, type, salary)
sales(value, status, salary, amount)
Task: Retrieve amount from orders that have at least one corresponding entry in sales sharing the same level.
SQL: | SELECT amount FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM sales AS lex
WHERE lex.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "sales",
"outer_alias": "kab",
"inner_alias": "lex",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00008 | train |
v3 | Schema:
categories (alias: egiv)(type, status, id, amount)
invoices(salary, level, status, code)
Task: Find code from categories where value exceeds the total amount from invoices for the same code.
SQL: | SELECT code FROM categories AS egiv
WHERE value > (
SELECT SUM(amount) FROM invoices AS fal
WHERE fal.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "invoices",
"outer_alias": "egiv",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_rand_v1_train_00009 | train |
v1 | Schema:
transactions (alias: gev)(date, type, id, value)
branches(status, date, name, salary)
Task: Retrieve id from transactions whose id is found in branches rows where status matches the outer record.
SQL: | SELECT id FROM transactions AS gev
WHERE id IN (
SELECT id FROM branches AS dov
WHERE dov.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "branches",
"outer_alias": "gev",
"inner_alias": "dov",
"proj_col": "id",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00010 | train |
v3 | Schema:
employees (alias: bev)(name, amount, salary, date)
regions(level, type, code, amount)
Task: Retrieve id from employees with amount above the MAX(amount) of regions rows sharing the same level.
SQL: | SELECT id FROM employees AS bev
WHERE amount > (
SELECT MAX(amount) FROM regions AS okiv
WHERE okiv.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "regions",
"outer_alias": "bev",
"inner_alias": "okiv",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00011 | train |
v2 | Schema:
regions (alias: okiv)(salary, type, code, id)
staff(level, name, type, code)
Task: Find name from regions where a matching record exists in staff with the same status.
SQL: | SELECT name FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "staff",
"outer_alias": "okiv",
"inner_alias": "xnob",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_rand_v1_train_00012 | train |
v1 | Schema:
items (alias: ikob)(value, code, type, id)
projects(date, code, name, amount)
Task: Retrieve id from items whose id is found in projects rows where id matches the outer record.
SQL: | SELECT id FROM items AS ikob
WHERE id IN (
SELECT id FROM projects AS uliv
WHERE uliv.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "projects",
"outer_alias": "ikob",
"inner_alias": "uliv",
"proj_col": "id",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_rand_v1_train_00013 | train |
v1 | Schema:
departments (alias: dov)(type, level, name, id)
staff(id, value, level, date)
Task: Retrieve name from departments whose status is found in staff rows where status matches the outer record.
SQL: | SELECT name FROM departments AS dov
WHERE status IN (
SELECT status FROM staff AS nad
WHERE nad.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "staff",
"outer_alias": "dov",
"inner_alias": "nad",
"proj_col": "name",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00014 | train |
v2 | Schema:
invoices (alias: fal)(date, value, type, level)
departments(type, salary, name, date)
Task: Find salary from invoices where a matching record exists in departments with the same status.
SQL: | SELECT salary FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM departments AS uliv
WHERE uliv.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "departments",
"outer_alias": "fal",
"inner_alias": "uliv",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00015 | train |
v2 | Schema:
branches (alias: agov)(level, amount, salary, code)
requests(name, code, salary, value)
Task: Retrieve value from branches that have at least one corresponding entry in requests sharing the same code.
SQL: | SELECT value FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM requests AS uliv
WHERE uliv.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "requests",
"outer_alias": "agov",
"inner_alias": "uliv",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_rand_v1_train_00016 | train |
v3 | Schema:
staff (alias: xnob)(code, id, name, status)
departments(name, date, amount, status)
Task: Retrieve name from staff with salary above the AVG(value) of departments rows sharing the same code.
SQL: | SELECT name FROM staff AS xnob
WHERE salary > (
SELECT AVG(value) FROM departments AS uliv
WHERE uliv.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "departments",
"outer_alias": "xnob",
"inner_alias": "uliv",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_rand_v1_train_00017 | train |
v2 | Schema:
categories (alias: egiv)(value, level, id, name)
schedules(type, salary, amount, id)
Task: Find name from categories where a matching record exists in schedules with the same level.
SQL: | SELECT name FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM schedules AS ejof
WHERE ejof.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "schedules",
"outer_alias": "egiv",
"inner_alias": "ejof",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_rand_v1_train_00018 | train |
v2 | Schema:
employees (alias: bev)(id, salary, date, level)
projects(amount, status, type, value)
Task: Retrieve code from employees that have at least one corresponding entry in projects sharing the same code.
SQL: | SELECT code FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "projects",
"outer_alias": "bev",
"inner_alias": "uliv",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00019 | train |
v2 | Schema:
shipments (alias: vnob)(date, status, level, type)
categories(amount, status, code, value)
Task: Retrieve salary from shipments that have at least one corresponding entry in categories sharing the same type.
SQL: | SELECT salary FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM categories AS fal
WHERE fal.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "categories",
"outer_alias": "vnob",
"inner_alias": "fal",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_rand_v1_train_00020 | train |
v1 | Schema:
sales (alias: cif)(id, amount, name, code)
shipments(code, date, name, salary)
Task: Find value from sales where type appears in shipments entries with matching type.
SQL: | SELECT value FROM sales AS cif
WHERE type IN (
SELECT type FROM shipments AS okiv
WHERE okiv.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "shipments",
"outer_alias": "cif",
"inner_alias": "okiv",
"proj_col": "value",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00021 | train |
v3 | Schema:
staff (alias: xnob)(type, amount, id, code)
requests(level, salary, code, value)
Task: Retrieve amount from staff with salary above the MAX(value) of requests rows sharing the same type.
SQL: | SELECT amount FROM staff AS xnob
WHERE salary > (
SELECT MAX(value) FROM requests AS vmob
WHERE vmob.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "requests",
"outer_alias": "xnob",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_rand_v1_train_00022 | train |
v3 | Schema:
managers (alias: hac)(value, date, level, name)
tasks(type, value, salary, level)
Task: Find code from managers where amount exceeds the maximum value from tasks for the same level.
SQL: | SELECT code FROM managers AS hac
WHERE amount > (
SELECT MAX(value) FROM tasks AS ikob
WHERE ikob.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "tasks",
"outer_alias": "hac",
"inner_alias": "ikob",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00023 | train |
v3 | Schema:
staff (alias: xnob)(amount, status, date, name)
requests(salary, name, code, type)
Task: Find amount from staff where salary exceeds the minimum salary from requests for the same code.
SQL: | SELECT amount FROM staff AS xnob
WHERE salary > (
SELECT MIN(salary) FROM requests AS znob
WHERE znob.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "requests",
"outer_alias": "xnob",
"inner_alias": "znob",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_rand_v1_train_00024 | train |
v3 | Schema:
products (alias: nad)(name, amount, salary, status)
regions(status, date, code, id)
Task: Find name from products where value exceeds the maximum salary from regions for the same code.
SQL: | SELECT name FROM products AS nad
WHERE value > (
SELECT MAX(salary) FROM regions AS dov
WHERE dov.code = nad.code
); | {
"outer_table": "products",
"inner_table": "regions",
"outer_alias": "nad",
"inner_alias": "dov",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00025 | train |
v3 | Schema:
items (alias: ikob)(name, salary, date, status)
requests(id, salary, level, type)
Task: Retrieve amount from items with value above the COUNT(value) of requests rows sharing the same level.
SQL: | SELECT amount FROM items AS ikob
WHERE value > (
SELECT COUNT(value) FROM requests AS vnob
WHERE vnob.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "requests",
"outer_alias": "ikob",
"inner_alias": "vnob",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_rand_v1_train_00026 | train |
v2 | Schema:
departments (alias: dov)(amount, date, status, level)
accounts(salary, amount, date, code)
Task: Find name from departments where a matching record exists in accounts with the same id.
SQL: | SELECT name FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM accounts AS okiv
WHERE okiv.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "accounts",
"outer_alias": "dov",
"inner_alias": "okiv",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00027 | train |
v3 | Schema:
projects (alias: uliv)(status, id, date, value)
orders(salary, level, id, status)
Task: Retrieve amount from projects with value above the SUM(amount) of orders rows sharing the same code.
SQL: | SELECT amount FROM projects AS uliv
WHERE value > (
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": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_rand_v1_train_00028 | train |
v1 | Schema:
requests (alias: ejof)(type, code, date, name)
managers(name, status, salary, value)
Task: Retrieve amount from requests whose level is found in managers rows where code matches the outer record.
SQL: | SELECT amount FROM requests AS ejof
WHERE level IN (
SELECT level FROM managers AS egiv
WHERE egiv.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "managers",
"outer_alias": "ejof",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_rand_v1_train_00029 | train |
v1 | Schema:
departments (alias: dov)(value, date, salary, level)
staff(type, level, value, status)
Task: Select value from departments where level exists in staff for the same level.
SQL: | SELECT value FROM departments AS dov
WHERE level IN (
SELECT level FROM staff AS xnob
WHERE xnob.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "staff",
"outer_alias": "dov",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00030 | train |
v3 | Schema:
staff (alias: xnob)(type, salary, value, name)
departments(type, code, id, name)
Task: Find name from staff where salary exceeds the minimum salary from departments for the same status.
SQL: | SELECT name FROM staff AS xnob
WHERE salary > (
SELECT MIN(salary) FROM departments AS znob
WHERE znob.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "departments",
"outer_alias": "xnob",
"inner_alias": "znob",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_rand_v1_train_00031 | train |
v3 | Schema:
customers (alias: lex)(code, status, type, date)
managers(name, salary, status, amount)
Task: Find code from customers where amount exceeds the count of amount from managers for the same level.
SQL: | SELECT code FROM customers AS lex
WHERE amount > (
SELECT COUNT(amount) FROM managers AS vmob
WHERE vmob.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "managers",
"outer_alias": "lex",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00032 | train |
v1 | Schema:
managers (alias: hac)(amount, salary, code, id)
requests(status, amount, name, salary)
Task: Select amount from managers where code exists in requests for the same id.
SQL: | SELECT amount FROM managers AS hac
WHERE code IN (
SELECT code FROM requests AS znob
WHERE znob.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "requests",
"outer_alias": "hac",
"inner_alias": "znob",
"proj_col": "amount",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00033 | train |
v2 | Schema:
customers (alias: lex)(name, level, type, value)
branches(amount, type, status, salary)
Task: Find value from customers where a matching record exists in branches with the same status.
SQL: | SELECT value FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM branches AS jac
WHERE jac.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "branches",
"outer_alias": "lex",
"inner_alias": "jac",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00034 | train |
v1 | Schema:
products (alias: nad)(type, name, value, amount)
departments(date, name, amount, id)
Task: Retrieve name from products whose id is found in departments rows where id matches the outer record.
SQL: | SELECT name FROM products AS nad
WHERE id IN (
SELECT id FROM departments AS egiv
WHERE egiv.id = nad.id
); | {
"outer_table": "products",
"inner_table": "departments",
"outer_alias": "nad",
"inner_alias": "egiv",
"proj_col": "name",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00035 | train |
v3 | Schema:
requests (alias: ejof)(salary, level, date, name)
departments(type, value, amount, name)
Task: Find value from requests where salary exceeds the count of salary from departments for the same type.
SQL: | SELECT value FROM requests AS ejof
WHERE salary > (
SELECT COUNT(salary) FROM departments AS cif
WHERE cif.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "departments",
"outer_alias": "ejof",
"inner_alias": "cif",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_rand_v1_train_00036 | train |
v2 | Schema:
accounts (alias: jac)(type, salary, amount, status)
customers(value, level, id, code)
Task: Retrieve code from accounts that have at least one corresponding entry in customers sharing the same type.
SQL: | SELECT code FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM customers AS bev
WHERE bev.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "customers",
"outer_alias": "jac",
"inner_alias": "bev",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00037 | train |
v2 | Schema:
transactions (alias: gev)(status, id, value, name)
customers(value, status, code, salary)
Task: Retrieve salary from transactions that have at least one corresponding entry in customers sharing the same type.
SQL: | SELECT salary FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM customers AS uliv
WHERE uliv.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "customers",
"outer_alias": "gev",
"inner_alias": "uliv",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00038 | train |
v1 | Schema:
products (alias: nad)(type, status, amount, date)
staff(value, amount, type, id)
Task: Retrieve code from products whose id is found in staff rows where level matches the outer record.
SQL: | SELECT code FROM products AS nad
WHERE id IN (
SELECT id FROM staff AS agov
WHERE agov.level = nad.level
); | {
"outer_table": "products",
"inner_table": "staff",
"outer_alias": "nad",
"inner_alias": "agov",
"proj_col": "code",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00039 | train |
v3 | Schema:
tasks (alias: znob)(amount, date, status, id)
products(salary, amount, level, value)
Task: Retrieve code from tasks with amount above the MIN(value) of products rows sharing the same type.
SQL: | SELECT code FROM tasks AS znob
WHERE amount > (
SELECT MIN(value) FROM products AS uliv
WHERE uliv.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "products",
"outer_alias": "znob",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_rand_v1_train_00040 | train |
v3 | Schema:
schedules (alias: vmob)(amount, salary, name, id)
products(id, type, value, level)
Task: Find code from schedules where amount exceeds the minimum salary from products for the same status.
SQL: | SELECT code FROM schedules AS vmob
WHERE amount > (
SELECT MIN(salary) FROM products AS agov
WHERE agov.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "products",
"outer_alias": "vmob",
"inner_alias": "agov",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_rand_v1_train_00041 | train |
v1 | Schema:
items (alias: ikob)(amount, level, salary, value)
departments(type, status, salary, name)
Task: Retrieve code from items whose id is found in departments rows where level matches the outer record.
SQL: | SELECT code FROM items AS ikob
WHERE id IN (
SELECT id FROM departments AS hac
WHERE hac.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "departments",
"outer_alias": "ikob",
"inner_alias": "hac",
"proj_col": "code",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_rand_v1_train_00042 | train |
v1 | Schema:
shipments (alias: vnob)(id, type, level, date)
accounts(level, type, id, amount)
Task: Retrieve code from shipments whose level is found in accounts rows where status matches the outer record.
SQL: | SELECT code FROM shipments AS vnob
WHERE level IN (
SELECT level FROM accounts AS znob
WHERE znob.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "accounts",
"outer_alias": "vnob",
"inner_alias": "znob",
"proj_col": "code",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_rand_v1_train_00043 | train |
v3 | Schema:
employees (alias: bev)(name, id, salary, date)
products(name, value, id, type)
Task: Retrieve id from employees with value above the AVG(salary) of products rows sharing the same id.
SQL: | SELECT id FROM employees AS bev
WHERE value > (
SELECT AVG(salary) FROM products AS jac
WHERE jac.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "products",
"outer_alias": "bev",
"inner_alias": "jac",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00044 | train |
v1 | Schema:
categories (alias: egiv)(name, amount, salary, level)
projects(type, level, id, value)
Task: Find salary from categories where type appears in projects entries with matching id.
SQL: | SELECT salary FROM categories AS egiv
WHERE type IN (
SELECT type FROM projects AS hac
WHERE hac.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "projects",
"outer_alias": "egiv",
"inner_alias": "hac",
"proj_col": "salary",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_rand_v1_train_00045 | train |
v2 | Schema:
transactions (alias: gev)(code, amount, salary, name)
orders(code, name, date, type)
Task: Retrieve code from transactions that have at least one corresponding entry in orders sharing the same level.
SQL: | SELECT code FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM orders AS ejof
WHERE ejof.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "orders",
"outer_alias": "gev",
"inner_alias": "ejof",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00046 | train |
v1 | Schema:
managers (alias: hac)(name, level, status, salary)
sales(value, salary, id, status)
Task: Select id from managers where id exists in sales for the same status.
SQL: | SELECT id FROM managers AS hac
WHERE id IN (
SELECT id FROM sales AS kab
WHERE kab.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "sales",
"outer_alias": "hac",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00047 | train |
v3 | Schema:
invoices (alias: fal)(name, salary, code, amount)
schedules(value, amount, date, type)
Task: Find id from invoices where salary exceeds the minimum amount from schedules for the same status.
SQL: | SELECT id FROM invoices AS fal
WHERE salary > (
SELECT MIN(amount) FROM schedules AS ikob
WHERE ikob.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "schedules",
"outer_alias": "fal",
"inner_alias": "ikob",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00048 | train |
v1 | Schema:
schedules (alias: vmob)(code, date, amount, value)
items(date, level, value, type)
Task: Find name from schedules where level appears in items entries with matching code.
SQL: | SELECT name FROM schedules AS vmob
WHERE level IN (
SELECT level FROM items AS cif
WHERE cif.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "items",
"outer_alias": "vmob",
"inner_alias": "cif",
"proj_col": "name",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_rand_v1_train_00049 | train |
v1 | Schema:
customers (alias: lex)(name, code, date, amount)
tasks(amount, status, code, value)
Task: Find value from customers where status appears in tasks entries with matching id.
SQL: | SELECT value FROM customers AS lex
WHERE status IN (
SELECT status FROM tasks AS cif
WHERE cif.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "tasks",
"outer_alias": "lex",
"inner_alias": "cif",
"proj_col": "value",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00050 | train |
v3 | Schema:
employees (alias: bev)(date, status, value, name)
branches(code, amount, value, status)
Task: Retrieve salary from employees with amount above the AVG(amount) of branches rows sharing the same status.
SQL: | SELECT salary FROM employees AS bev
WHERE amount > (
SELECT AVG(amount) FROM branches AS agov
WHERE agov.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "branches",
"outer_alias": "bev",
"inner_alias": "agov",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00051 | train |
v3 | Schema:
sales (alias: cif)(name, value, type, salary)
projects(salary, type, status, code)
Task: Retrieve id from sales with value above the SUM(value) of projects rows sharing the same level.
SQL: | SELECT id FROM sales AS cif
WHERE value > (
SELECT SUM(value) FROM projects AS xnob
WHERE xnob.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "projects",
"outer_alias": "cif",
"inner_alias": "xnob",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00052 | train |
v3 | Schema:
sales (alias: cif)(salary, level, date, type)
invoices(date, amount, type, level)
Task: Find code from sales where amount exceeds the total value from invoices for the same code.
SQL: | SELECT code FROM sales AS cif
WHERE amount > (
SELECT SUM(value) FROM invoices AS vmob
WHERE vmob.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "invoices",
"outer_alias": "cif",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00053 | train |
v2 | Schema:
tasks (alias: znob)(date, id, code, type)
accounts(date, name, code, id)
Task: Find name from tasks where a matching record exists in accounts with the same status.
SQL: | SELECT name FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM accounts AS uliv
WHERE uliv.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "accounts",
"outer_alias": "znob",
"inner_alias": "uliv",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_rand_v1_train_00054 | train |
v3 | Schema:
projects (alias: uliv)(date, level, type, id)
categories(level, salary, value, type)
Task: Retrieve id from projects with amount above the MIN(salary) of categories rows sharing the same code.
SQL: | SELECT id FROM projects AS uliv
WHERE amount > (
SELECT MIN(salary) FROM categories AS vnob
WHERE vnob.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "categories",
"outer_alias": "uliv",
"inner_alias": "vnob",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_rand_v1_train_00055 | train |
v3 | Schema:
accounts (alias: jac)(type, level, id, date)
invoices(date, status, id, name)
Task: Retrieve amount from accounts with amount above the SUM(amount) of invoices rows sharing the same code.
SQL: | SELECT amount FROM accounts AS jac
WHERE amount > (
SELECT SUM(amount) FROM invoices AS znob
WHERE znob.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "invoices",
"outer_alias": "jac",
"inner_alias": "znob",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00056 | train |
v3 | Schema:
tasks (alias: znob)(value, status, amount, name)
transactions(id, amount, code, salary)
Task: Retrieve name from tasks with amount above the MAX(value) of transactions rows sharing the same id.
SQL: | SELECT name FROM tasks AS znob
WHERE amount > (
SELECT MAX(value) FROM transactions AS vmob
WHERE vmob.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "transactions",
"outer_alias": "znob",
"inner_alias": "vmob",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_rand_v1_train_00057 | train |
v2 | Schema:
projects (alias: uliv)(code, name, amount, type)
departments(level, type, date, code)
Task: Retrieve salary from projects that have at least one corresponding entry in departments sharing the same level.
SQL: | SELECT salary FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM departments AS lex
WHERE lex.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "departments",
"outer_alias": "uliv",
"inner_alias": "lex",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_rand_v1_train_00058 | train |
v2 | Schema:
items (alias: ikob)(id, salary, type, name)
projects(level, code, value, type)
Task: Find name from items where a matching record exists in projects with the same level.
SQL: | SELECT name FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM projects AS ejof
WHERE ejof.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "projects",
"outer_alias": "ikob",
"inner_alias": "ejof",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_rand_v1_train_00059 | train |
v3 | Schema:
categories (alias: egiv)(status, code, type, name)
departments(level, value, date, code)
Task: Retrieve id from categories with amount above the AVG(salary) of departments rows sharing the same level.
SQL: | SELECT id FROM categories AS egiv
WHERE amount > (
SELECT AVG(salary) FROM departments AS ejof
WHERE ejof.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "departments",
"outer_alias": "egiv",
"inner_alias": "ejof",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_rand_v1_train_00060 | train |
v1 | Schema:
regions (alias: okiv)(amount, level, value, salary)
accounts(code, date, name, id)
Task: Select amount from regions where status exists in accounts for the same code.
SQL: | SELECT amount FROM regions AS okiv
WHERE status IN (
SELECT status FROM accounts AS lex
WHERE lex.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "accounts",
"outer_alias": "okiv",
"inner_alias": "lex",
"proj_col": "amount",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_rand_v1_train_00061 | train |
v3 | Schema:
products (alias: nad)(type, salary, amount, level)
transactions(name, date, amount, code)
Task: Retrieve salary from products with amount above the SUM(amount) of transactions rows sharing the same status.
SQL: | SELECT salary FROM products AS nad
WHERE amount > (
SELECT SUM(amount) FROM transactions AS bev
WHERE bev.status = nad.status
); | {
"outer_table": "products",
"inner_table": "transactions",
"outer_alias": "nad",
"inner_alias": "bev",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00062 | train |
v2 | Schema:
managers (alias: hac)(status, code, name, date)
requests(level, status, value, id)
Task: Find salary from managers where a matching record exists in requests with the same id.
SQL: | SELECT salary FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM requests AS lex
WHERE lex.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "requests",
"outer_alias": "hac",
"inner_alias": "lex",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00063 | train |
v3 | Schema:
shipments (alias: vnob)(date, salary, status, code)
accounts(id, value, status, salary)
Task: Find value from shipments where amount exceeds the count of value from accounts for the same type.
SQL: | SELECT value FROM shipments AS vnob
WHERE amount > (
SELECT COUNT(value) FROM accounts AS ejof
WHERE ejof.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "accounts",
"outer_alias": "vnob",
"inner_alias": "ejof",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_rand_v1_train_00064 | train |
v1 | Schema:
products (alias: nad)(status, id, salary, name)
employees(date, code, level, salary)
Task: Retrieve code from products whose type is found in employees rows where id matches the outer record.
SQL: | SELECT code FROM products AS nad
WHERE type IN (
SELECT type FROM employees AS gev
WHERE gev.id = nad.id
); | {
"outer_table": "products",
"inner_table": "employees",
"outer_alias": "nad",
"inner_alias": "gev",
"proj_col": "code",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00065 | train |
v3 | Schema:
items (alias: ikob)(code, name, amount, date)
staff(type, code, date, status)
Task: Retrieve salary from items with amount above the MIN(salary) of staff rows sharing the same level.
SQL: | SELECT salary FROM items AS ikob
WHERE amount > (
SELECT MIN(salary) FROM staff AS vmob
WHERE vmob.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "staff",
"outer_alias": "ikob",
"inner_alias": "vmob",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_rand_v1_train_00066 | train |
v2 | Schema:
requests (alias: ejof)(date, value, status, level)
shipments(code, date, salary, id)
Task: Find amount from requests where a matching record exists in shipments with the same level.
SQL: | SELECT amount FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM shipments AS nad
WHERE nad.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "shipments",
"outer_alias": "ejof",
"inner_alias": "nad",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_rand_v1_train_00067 | train |
v3 | Schema:
accounts (alias: jac)(level, id, date, status)
sales(date, type, code, value)
Task: Retrieve value from accounts with salary above the MIN(amount) of sales rows sharing the same status.
SQL: | SELECT value FROM accounts AS jac
WHERE salary > (
SELECT MIN(amount) FROM sales AS fal
WHERE fal.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "sales",
"outer_alias": "jac",
"inner_alias": "fal",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00068 | train |
v1 | Schema:
orders (alias: kab)(name, id, value, date)
transactions(type, date, status, amount)
Task: Retrieve salary from orders whose status is found in transactions rows where code matches the outer record.
SQL: | SELECT salary FROM orders AS kab
WHERE status IN (
SELECT status FROM transactions AS uliv
WHERE uliv.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "transactions",
"outer_alias": "kab",
"inner_alias": "uliv",
"proj_col": "salary",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00069 | train |
v3 | Schema:
items (alias: ikob)(name, value, type, code)
departments(salary, id, date, value)
Task: Find id from items where amount exceeds the average salary from departments for the same id.
SQL: | SELECT id FROM items AS ikob
WHERE amount > (
SELECT AVG(salary) FROM departments AS gev
WHERE gev.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "departments",
"outer_alias": "ikob",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_rand_v1_train_00070 | train |
v2 | Schema:
invoices (alias: fal)(name, code, salary, type)
staff(status, amount, level, code)
Task: Retrieve name from invoices that have at least one corresponding entry in staff sharing the same level.
SQL: | SELECT name FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM staff AS dov
WHERE dov.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "staff",
"outer_alias": "fal",
"inner_alias": "dov",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00071 | train |
v1 | Schema:
projects (alias: uliv)(code, salary, level, value)
shipments(level, id, date, salary)
Task: Select id from projects where code exists in shipments for the same id.
SQL: | SELECT id FROM projects AS uliv
WHERE code IN (
SELECT code FROM shipments AS egiv
WHERE egiv.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "shipments",
"outer_alias": "uliv",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_rand_v1_train_00072 | train |
v2 | Schema:
regions (alias: okiv)(level, type, status, date)
tasks(status, value, type, id)
Task: Find amount from regions where a matching record exists in tasks with the same code.
SQL: | SELECT amount FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM tasks AS uliv
WHERE uliv.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "tasks",
"outer_alias": "okiv",
"inner_alias": "uliv",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_rand_v1_train_00073 | train |
v2 | Schema:
orders (alias: kab)(status, value, id, amount)
transactions(type, amount, status, level)
Task: Find amount from orders where a matching record exists in transactions with the same code.
SQL: | SELECT amount FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM transactions AS vmob
WHERE vmob.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "transactions",
"outer_alias": "kab",
"inner_alias": "vmob",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00074 | train |
v2 | Schema:
departments (alias: dov)(value, level, name, date)
categories(value, date, amount, id)
Task: Find name from departments where a matching record exists in categories with the same status.
SQL: | SELECT name FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM categories AS ikob
WHERE ikob.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "categories",
"outer_alias": "dov",
"inner_alias": "ikob",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00075 | train |
v3 | Schema:
tasks (alias: znob)(amount, code, value, status)
schedules(name, value, amount, level)
Task: Find code from tasks where value exceeds the total amount from schedules for the same code.
SQL: | SELECT code FROM tasks AS znob
WHERE value > (
SELECT SUM(amount) FROM schedules AS jac
WHERE jac.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "schedules",
"outer_alias": "znob",
"inner_alias": "jac",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_rand_v1_train_00076 | train |
v3 | Schema:
employees (alias: bev)(status, id, value, type)
shipments(name, amount, type, status)
Task: Retrieve id from employees with amount above the COUNT(amount) of shipments rows sharing the same code.
SQL: | SELECT id FROM employees AS bev
WHERE amount > (
SELECT COUNT(amount) FROM shipments AS nad
WHERE nad.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "shipments",
"outer_alias": "bev",
"inner_alias": "nad",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00077 | train |
v1 | Schema:
tasks (alias: znob)(id, amount, level, status)
shipments(status, amount, value, salary)
Task: Find amount from tasks where type appears in shipments entries with matching level.
SQL: | SELECT amount FROM tasks AS znob
WHERE type IN (
SELECT type FROM shipments AS xnob
WHERE xnob.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "shipments",
"outer_alias": "znob",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_rand_v1_train_00078 | train |
v1 | Schema:
orders (alias: kab)(value, status, code, id)
regions(id, level, salary, status)
Task: Select value from orders where code exists in regions for the same code.
SQL: | SELECT value FROM orders AS kab
WHERE code IN (
SELECT code FROM regions AS agov
WHERE agov.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "regions",
"outer_alias": "kab",
"inner_alias": "agov",
"proj_col": "value",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00079 | train |
v1 | Schema:
customers (alias: lex)(date, status, code, id)
items(level, date, id, salary)
Task: Find code from customers where code appears in items entries with matching id.
SQL: | SELECT code FROM customers AS lex
WHERE code IN (
SELECT code FROM items AS nad
WHERE nad.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "items",
"outer_alias": "lex",
"inner_alias": "nad",
"proj_col": "code",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00080 | train |
v3 | Schema:
transactions (alias: gev)(salary, name, id, level)
projects(date, id, salary, code)
Task: Find value from transactions where salary exceeds the total value from projects for the same type.
SQL: | SELECT value FROM transactions AS gev
WHERE salary > (
SELECT SUM(value) FROM projects AS znob
WHERE znob.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "projects",
"outer_alias": "gev",
"inner_alias": "znob",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00081 | train |
v3 | Schema:
regions (alias: okiv)(status, code, value, amount)
staff(amount, id, name, status)
Task: Retrieve id from regions with amount above the MAX(amount) of staff rows sharing the same level.
SQL: | SELECT id FROM regions AS okiv
WHERE amount > (
SELECT MAX(amount) FROM staff AS egiv
WHERE egiv.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "staff",
"outer_alias": "okiv",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_rand_v1_train_00082 | train |
v1 | Schema:
projects (alias: uliv)(amount, status, code, id)
branches(amount, salary, level, code)
Task: Retrieve salary from projects whose id is found in branches rows where type matches the outer record.
SQL: | SELECT salary FROM projects AS uliv
WHERE id IN (
SELECT id FROM branches AS ikob
WHERE ikob.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "branches",
"outer_alias": "uliv",
"inner_alias": "ikob",
"proj_col": "salary",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_rand_v1_train_00083 | train |
v1 | Schema:
transactions (alias: gev)(status, amount, code, value)
shipments(date, amount, name, salary)
Task: Find id from transactions where type appears in shipments entries with matching id.
SQL: | SELECT id FROM transactions AS gev
WHERE type IN (
SELECT type FROM shipments AS dov
WHERE dov.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "shipments",
"outer_alias": "gev",
"inner_alias": "dov",
"proj_col": "id",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00084 | train |
v3 | Schema:
staff (alias: xnob)(level, type, status, name)
shipments(value, name, id, type)
Task: Find id from staff where salary exceeds the minimum value from shipments for the same type.
SQL: | SELECT id FROM staff AS xnob
WHERE salary > (
SELECT MIN(value) FROM shipments AS kab
WHERE kab.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "shipments",
"outer_alias": "xnob",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_rand_v1_train_00085 | train |
v3 | Schema:
staff (alias: xnob)(amount, date, id, code)
orders(level, type, date, amount)
Task: Find name from staff where salary exceeds the maximum amount from orders for the same code.
SQL: | SELECT name FROM staff AS xnob
WHERE salary > (
SELECT MAX(amount) FROM orders AS dov
WHERE dov.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "orders",
"outer_alias": "xnob",
"inner_alias": "dov",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_rand_v1_train_00086 | train |
v1 | Schema:
sales (alias: cif)(name, date, type, status)
schedules(date, level, name, salary)
Task: Retrieve amount from sales whose type is found in schedules rows where id matches the outer record.
SQL: | SELECT amount FROM sales AS cif
WHERE type IN (
SELECT type FROM schedules AS jac
WHERE jac.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "schedules",
"outer_alias": "cif",
"inner_alias": "jac",
"proj_col": "amount",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00087 | train |
v1 | Schema:
shipments (alias: vnob)(name, code, salary, status)
schedules(level, value, name, type)
Task: Select code from shipments where id exists in schedules for the same type.
SQL: | SELECT code FROM shipments AS vnob
WHERE id IN (
SELECT id FROM schedules AS uliv
WHERE uliv.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "schedules",
"outer_alias": "vnob",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_rand_v1_train_00088 | train |
v1 | Schema:
products (alias: nad)(amount, status, salary, id)
staff(amount, id, date, code)
Task: Find value from products where code appears in staff entries with matching status.
SQL: | SELECT value FROM products AS nad
WHERE code IN (
SELECT code FROM staff AS uliv
WHERE uliv.status = nad.status
); | {
"outer_table": "products",
"inner_table": "staff",
"outer_alias": "nad",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00089 | train |
v2 | Schema:
staff (alias: xnob)(status, level, id, salary)
tasks(level, value, salary, code)
Task: Find salary from staff where a matching record exists in tasks with the same level.
SQL: | SELECT salary FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM tasks AS hac
WHERE hac.level = xnob.level
); | {
"outer_table": "staff",
"inner_table": "tasks",
"outer_alias": "xnob",
"inner_alias": "hac",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "xnob.level",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_rand_v1_train_00090 | train |
v1 | Schema:
departments (alias: dov)(type, value, date, amount)
invoices(status, level, code, salary)
Task: Retrieve amount from departments whose id is found in invoices rows where type matches the outer record.
SQL: | SELECT amount FROM departments AS dov
WHERE id IN (
SELECT id FROM invoices AS fal
WHERE fal.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "invoices",
"outer_alias": "dov",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00091 | train |
v3 | Schema:
regions (alias: okiv)(value, name, status, date)
staff(type, name, id, level)
Task: Find salary from regions where salary exceeds the maximum salary from staff for the same status.
SQL: | SELECT salary FROM regions AS okiv
WHERE salary > (
SELECT MAX(salary) FROM staff AS cif
WHERE cif.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "staff",
"outer_alias": "okiv",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_rand_v1_train_00092 | train |
v3 | Schema:
accounts (alias: jac)(date, code, salary, name)
regions(id, level, status, amount)
Task: Find code from accounts where value exceeds the average salary from regions for the same type.
SQL: | SELECT code FROM accounts AS jac
WHERE value > (
SELECT AVG(salary) FROM regions AS dov
WHERE dov.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "regions",
"outer_alias": "jac",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00093 | train |
v2 | Schema:
categories (alias: egiv)(code, id, name, value)
shipments(date, amount, salary, level)
Task: Retrieve name from categories that have at least one corresponding entry in shipments sharing the same level.
SQL: | SELECT name FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM shipments AS okiv
WHERE okiv.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "shipments",
"outer_alias": "egiv",
"inner_alias": "okiv",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_rand_v1_train_00094 | train |
v3 | Schema:
staff (alias: xnob)(name, salary, amount, value)
requests(date, code, name, salary)
Task: Retrieve code from staff with value above the COUNT(amount) of requests rows sharing the same level.
SQL: | SELECT code FROM staff AS xnob
WHERE value > (
SELECT COUNT(amount) FROM requests AS dov
WHERE dov.level = xnob.level
); | {
"outer_table": "staff",
"inner_table": "requests",
"outer_alias": "xnob",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "xnob.level",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_rand_v1_train_00095 | train |
v1 | Schema:
invoices (alias: fal)(level, name, code, type)
customers(status, amount, level, id)
Task: Retrieve id from invoices whose code is found in customers rows where level matches the outer record.
SQL: | SELECT id FROM invoices AS fal
WHERE code IN (
SELECT code FROM customers AS hac
WHERE hac.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "customers",
"outer_alias": "fal",
"inner_alias": "hac",
"proj_col": "id",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00096 | train |
v1 | Schema:
regions (alias: okiv)(salary, amount, level, type)
invoices(status, value, id, type)
Task: Find name from regions where level appears in invoices entries with matching code.
SQL: | SELECT name FROM regions AS okiv
WHERE level IN (
SELECT level FROM invoices AS dov
WHERE dov.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "invoices",
"outer_alias": "okiv",
"inner_alias": "dov",
"proj_col": "name",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_rand_v1_train_00097 | train |
v1 | Schema:
managers (alias: hac)(date, salary, name, status)
categories(amount, code, value, status)
Task: Retrieve salary from managers whose status is found in categories rows where level matches the outer record.
SQL: | SELECT salary FROM managers AS hac
WHERE status IN (
SELECT status FROM categories AS uliv
WHERE uliv.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "categories",
"outer_alias": "hac",
"inner_alias": "uliv",
"proj_col": "salary",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_rand_v1_train_00098 | train |
v3 | Schema:
tasks (alias: znob)(level, date, code, name)
accounts(level, date, salary, amount)
Task: Find id from tasks where amount exceeds the minimum amount from accounts for the same code.
SQL: | SELECT id FROM tasks AS znob
WHERE amount > (
SELECT MIN(amount) FROM accounts AS okiv
WHERE okiv.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "accounts",
"outer_alias": "znob",
"inner_alias": "okiv",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_rand_v1_train_00099 | train |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 40