Dataset Viewer
Auto-converted to Parquet Duplicate
variant
stringclasses
3 values
prompt
stringlengths
185
259
sql
stringlengths
115
154
metadata
unknown
v1
Schema: workforce_data (alias: empl)(level, status, id, value) journal_entries(code, value, level, salary) Task: Select code from workforce_data where code exists in journal_entries for the same id. SQL:
SELECT code FROM workforce_data AS empl WHERE code IN ( SELECT code FROM journal_entries AS inv WHERE inv.id = empl.id );
{ "outer_table": "workforce_data", "inner_table": "journal_entries", "outer_alias": "empl", "inner_alias": "inv", "proj_col": "code", "filter_col": "code", "join_col": "id", "correlated_ref": "empl.id", "token_group": "T1", "fan_out": 1 }
v2
Schema: receivables_log (alias: inv)(code, level, value, type) workforce_data(level, salary, id, value) Task: Retrieve name from receivables_log that have at least one corresponding entry in workforce_data sharing the same id. SQL:
SELECT name FROM receivables_log AS inv WHERE EXISTS ( SELECT 1 FROM workforce_data AS dpt WHERE dpt.id = inv.id );
{ "outer_table": "receivables_log", "inner_table": "workforce_data", "outer_alias": "inv", "inner_alias": "dpt", "proj_col": "name", "join_col": "id", "correlated_ref": "inv.id", "token_group": "T2", "fan_out": 70 }
v2
Schema: sales_registry (alias: usr)(salary, code, level, amount) activity_log(amount, id, name, code) Task: Select value from sales_registry that have at least one matching row in activity_log for the same type. SQL:
SELECT value FROM sales_registry AS usr WHERE EXISTS ( SELECT 1 FROM activity_log AS empl WHERE empl.type = usr.type );
{ "outer_table": "sales_registry", "inner_table": "activity_log", "outer_alias": "usr", "inner_alias": "empl", "proj_col": "value", "join_col": "type", "correlated_ref": "usr.type", "token_group": "T2", "fan_out": 110 }
v2
Schema: cost_centers (alias: dept)(name, id, level, status) personnel_registry(type, status, name, amount) Task: Select value from cost_centers that have at least one matching row in personnel_registry for the same status. SQL:
SELECT value FROM cost_centers AS dept WHERE EXISTS ( SELECT 1 FROM personnel_registry AS act WHERE act.status = dept.status );
{ "outer_table": "cost_centers", "inner_table": "personnel_registry", "outer_alias": "dept", "inner_alias": "act", "proj_col": "value", "join_col": "status", "correlated_ref": "dept.status", "token_group": "T1", "fan_out": 1 }
v2
Schema: sales_queue (alias: ord)(date, status, id, amount) facility_registry(status, name, date, amount) Task: Retrieve value from sales_queue that have at least one corresponding entry in facility_registry sharing the same status. SQL:
SELECT value FROM sales_queue AS ord WHERE EXISTS ( SELECT 1 FROM facility_registry AS brc WHERE brc.status = ord.status );
{ "outer_table": "sales_queue", "inner_table": "facility_registry", "outer_alias": "ord", "inner_alias": "brc", "proj_col": "value", "join_col": "status", "correlated_ref": "ord.status", "token_group": "T2", "fan_out": 50 }
v3
Schema: personnel_registry (alias: emp)(name, type, value, salary) sourcing_list(type, id, value, level) Task: Select code from personnel_registry where amount is greater than the count of of value in sourcing_list for matching id. SQL:
SELECT code FROM personnel_registry AS emp WHERE amount > ( SELECT COUNT(value) FROM sourcing_list AS ctg WHERE ctg.id = emp.id );
{ "outer_table": "personnel_registry", "inner_table": "sourcing_list", "outer_alias": "emp", "inner_alias": "ctg", "proj_col": "code", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "emp.id", "token_group": "T2", "fan_out": 80 }
v3
Schema: sales_registry (alias: usr)(date, level, id, amount) sales_queue(amount, date, status, id) Task: Retrieve value from sales_registry with amount above the AVG(value) of sales_queue rows sharing the same level. SQL:
SELECT value FROM sales_registry AS usr WHERE amount > ( SELECT AVG(value) FROM sales_queue AS spl WHERE spl.level = usr.level );
{ "outer_table": "sales_registry", "inner_table": "sales_queue", "outer_alias": "usr", "inner_alias": "spl", "proj_col": "value", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "usr.level", "token_group": "T1", "fan_out": 1 }
v1
Schema: stock_catalog (alias: prod)(code, level, name, salary) sales_queue(code, level, status, type) Task: Select salary from stock_catalog where type exists in sales_queue for the same type. SQL:
SELECT salary FROM stock_catalog AS prod WHERE type IN ( SELECT type FROM sales_queue AS prj WHERE prj.type = prod.type );
{ "outer_table": "stock_catalog", "inner_table": "sales_queue", "outer_alias": "prod", "inner_alias": "prj", "proj_col": "salary", "filter_col": "type", "join_col": "type", "correlated_ref": "prod.type", "token_group": "T2", "fan_out": 90 }
v3
Schema: personnel_registry (alias: emp)(amount, level, id, date) sales_queue(id, type, code, level) Task: Retrieve salary from personnel_registry with amount above the MIN(amount) of sales_queue rows sharing the same status. SQL:
SELECT salary FROM personnel_registry AS emp WHERE amount > ( SELECT MIN(amount) FROM sales_queue AS ordr WHERE ordr.status = emp.status );
{ "outer_table": "personnel_registry", "inner_table": "sales_queue", "outer_alias": "emp", "inner_alias": "ordr", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "emp.status", "token_group": "T2", "fan_out": 95 }
v1
Schema: cost_centers (alias: dept)(level, status, name, type) portfolio_index(type, id, status, amount) Task: Retrieve name from cost_centers whose code is found in portfolio_index rows where type matches the outer record. SQL:
SELECT name FROM cost_centers AS dept WHERE code IN ( SELECT code FROM portfolio_index AS emp WHERE emp.type = dept.type );
{ "outer_table": "cost_centers", "inner_table": "portfolio_index", "outer_alias": "dept", "inner_alias": "emp", "proj_col": "name", "filter_col": "code", "join_col": "type", "correlated_ref": "dept.type", "token_group": "T1", "fan_out": 1 }
v3
Schema: engagement_log (alias: mgr)(status, level, date, salary) facility_registry(date, type, salary, value) Task: Retrieve code from engagement_log with amount above the SUM(amount) of facility_registry rows sharing the same code. SQL:
SELECT code FROM engagement_log AS mgr WHERE amount > ( SELECT SUM(amount) FROM facility_registry AS ctg WHERE ctg.code = mgr.code );
{ "outer_table": "engagement_log", "inner_table": "facility_registry", "outer_alias": "mgr", "inner_alias": "ctg", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "mgr.code", "token_group": "T2", "fan_out": 80 }
v2
Schema: workforce_data (alias: empl)(value, id, salary, level) attribute_groups(date, salary, level, type) Task: Select salary from workforce_data that have at least one matching row in attribute_groups for the same type. SQL:
SELECT salary FROM workforce_data AS empl WHERE EXISTS ( SELECT 1 FROM attribute_groups AS shp WHERE shp.type = empl.type );
{ "outer_table": "workforce_data", "inner_table": "attribute_groups", "outer_alias": "empl", "inner_alias": "shp", "proj_col": "salary", "join_col": "type", "correlated_ref": "empl.type", "token_group": "T2", "fan_out": 85 }
v1
Schema: cost_centers (alias: dept)(code, salary, name, type) personnel_registry(id, date, status, level) Task: Find value from cost_centers where code appears in personnel_registry entries with matching type. SQL:
SELECT value FROM cost_centers AS dept WHERE code IN ( SELECT code FROM personnel_registry AS prj WHERE prj.type = dept.type );
{ "outer_table": "cost_centers", "inner_table": "personnel_registry", "outer_alias": "dept", "inner_alias": "prj", "proj_col": "value", "filter_col": "code", "join_col": "type", "correlated_ref": "dept.type", "token_group": "T2", "fan_out": 90 }
v2
Schema: personnel_registry (alias: emp)(level, salary, name, code) engagement_log(code, salary, id, value) Task: Select code from personnel_registry that have at least one matching row in engagement_log for the same level. SQL:
SELECT code FROM personnel_registry AS emp WHERE EXISTS ( SELECT 1 FROM engagement_log AS whs WHERE whs.level = emp.level );
{ "outer_table": "personnel_registry", "inner_table": "engagement_log", "outer_alias": "emp", "inner_alias": "whs", "proj_col": "code", "join_col": "level", "correlated_ref": "emp.level", "token_group": "T2", "fan_out": 65 }
v1
Schema: sales_queue (alias: ord)(date, amount, status, code) sales_registry(status, type, date, amount) Task: Retrieve value from sales_queue whose id is found in sales_registry rows where code matches the outer record. SQL:
SELECT value FROM sales_queue AS ord WHERE id IN ( SELECT id FROM sales_registry AS prd WHERE prd.code = ord.code );
{ "outer_table": "sales_queue", "inner_table": "sales_registry", "outer_alias": "ord", "inner_alias": "prd", "proj_col": "value", "filter_col": "id", "join_col": "code", "correlated_ref": "ord.code", "token_group": "T2", "fan_out": 90 }
v3
Schema: receivables_log (alias: inv)(salary, type, id, date) facility_registry(level, type, id, date) Task: Select amount from receivables_log where value is greater than the maximum of salary in facility_registry for matching status. SQL:
SELECT amount FROM receivables_log AS inv WHERE value > ( SELECT MAX(salary) FROM facility_registry AS rgn WHERE rgn.status = inv.status );
{ "outer_table": "receivables_log", "inner_table": "facility_registry", "outer_alias": "inv", "inner_alias": "rgn", "proj_col": "amount", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "inv.status", "token_group": "T2", "fan_out": 60 }
v2
Schema: engagement_log (alias: mgr)(id, type, amount, value) stock_catalog(salary, id, name, level) Task: Retrieve name from engagement_log that have at least one corresponding entry in stock_catalog sharing the same code. SQL:
SELECT name FROM engagement_log AS mgr WHERE EXISTS ( SELECT 1 FROM stock_catalog AS tsk WHERE tsk.code = mgr.code );
{ "outer_table": "engagement_log", "inner_table": "stock_catalog", "outer_alias": "mgr", "inner_alias": "tsk", "proj_col": "name", "join_col": "code", "correlated_ref": "mgr.code", "token_group": "T2", "fan_out": 55 }
v2
Schema: cost_centers (alias: dept)(code, level, id, type) personnel_registry(id, status, level, salary) Task: Find salary from cost_centers where a matching record exists in personnel_registry with the same code. SQL:
SELECT salary FROM cost_centers AS dept WHERE EXISTS ( SELECT 1 FROM personnel_registry AS tsk WHERE tsk.code = dept.code );
{ "outer_table": "cost_centers", "inner_table": "personnel_registry", "outer_alias": "dept", "inner_alias": "tsk", "proj_col": "salary", "join_col": "code", "correlated_ref": "dept.code", "token_group": "T2", "fan_out": 55 }
v3
Schema: stock_catalog (alias: prod)(level, date, type, value) receivables_log(level, status, code, amount) Task: Select value from stock_catalog where salary is greater than the average of salary in receivables_log for matching status. SQL:
SELECT value FROM stock_catalog AS prod WHERE salary > ( SELECT AVG(salary) FROM receivables_log AS txn WHERE txn.status = prod.status );
{ "outer_table": "stock_catalog", "inner_table": "receivables_log", "outer_alias": "prod", "inner_alias": "txn", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "prod.status", "token_group": "T1", "fan_out": 1 }
v3
Schema: personnel_registry (alias: emp)(amount, code, status, id) engagement_log(salary, date, status, value) Task: Select salary from personnel_registry where amount is greater than the count of of amount in engagement_log for matching status. SQL:
SELECT salary FROM personnel_registry AS emp WHERE amount > ( SELECT COUNT(amount) FROM engagement_log AS prd WHERE prd.status = emp.status );
{ "outer_table": "personnel_registry", "inner_table": "engagement_log", "outer_alias": "emp", "inner_alias": "prd", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "emp.status", "token_group": "T2", "fan_out": 90 }
v3
Schema: cost_centers (alias: dept)(level, status, type, code) acquisition_log(status, type, amount, id) Task: Find code from cost_centers where value exceeds the count of amount from acquisition_log for the same code. SQL:
SELECT code FROM cost_centers AS dept WHERE value > ( SELECT COUNT(amount) FROM acquisition_log AS prd WHERE prd.code = dept.code );
{ "outer_table": "cost_centers", "inner_table": "acquisition_log", "outer_alias": "dept", "inner_alias": "prd", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "dept.code", "token_group": "T2", "fan_out": 90 }
v1
Schema: personnel_registry (alias: emp)(amount, salary, name, value) workforce_data(amount, status, name, type) Task: Find amount from personnel_registry where level appears in workforce_data entries with matching code. SQL:
SELECT amount FROM personnel_registry AS emp WHERE level IN ( SELECT level FROM workforce_data AS dpt WHERE dpt.code = emp.code );
{ "outer_table": "personnel_registry", "inner_table": "workforce_data", "outer_alias": "emp", "inner_alias": "dpt", "proj_col": "amount", "filter_col": "level", "join_col": "code", "correlated_ref": "emp.code", "token_group": "T2", "fan_out": 70 }
v1
Schema: personnel_registry (alias: emp)(code, id, level, type) sales_queue(id, name, salary, status) Task: Find amount from personnel_registry where code appears in sales_queue entries with matching id. SQL:
SELECT amount FROM personnel_registry AS emp WHERE code IN ( SELECT code FROM sales_queue AS dpt WHERE dpt.id = emp.id );
{ "outer_table": "personnel_registry", "inner_table": "sales_queue", "outer_alias": "emp", "inner_alias": "dpt", "proj_col": "amount", "filter_col": "code", "join_col": "id", "correlated_ref": "emp.id", "token_group": "T2", "fan_out": 70 }
v1
Schema: workforce_data (alias: empl)(salary, code, id, amount) receivables_log(id, name, level, value) Task: Retrieve name from workforce_data whose type is found in receivables_log rows where level matches the outer record. SQL:
SELECT name FROM workforce_data AS empl WHERE type IN ( SELECT type FROM receivables_log AS prj WHERE prj.level = empl.level );
{ "outer_table": "workforce_data", "inner_table": "receivables_log", "outer_alias": "empl", "inner_alias": "prj", "proj_col": "name", "filter_col": "type", "join_col": "level", "correlated_ref": "empl.level", "token_group": "T2", "fan_out": 90 }
v3
Schema: personnel_registry (alias: emp)(code, id, value, name) cost_centers(amount, salary, id, type) Task: Retrieve amount from personnel_registry with salary above the MIN(value) of cost_centers rows sharing the same id. SQL:
SELECT amount FROM personnel_registry AS emp WHERE salary > ( SELECT MIN(value) FROM cost_centers AS dpt WHERE dpt.id = emp.id );
{ "outer_table": "personnel_registry", "inner_table": "cost_centers", "outer_alias": "emp", "inner_alias": "dpt", "proj_col": "amount", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "emp.id", "token_group": "T2", "fan_out": 70 }
v2
Schema: workforce_data (alias: empl)(code, date, level, amount) stock_catalog(status, level, type, value) Task: Select name from workforce_data that have at least one matching row in stock_catalog for the same id. SQL:
SELECT name FROM workforce_data AS empl WHERE EXISTS ( SELECT 1 FROM stock_catalog AS act WHERE act.id = empl.id );
{ "outer_table": "workforce_data", "inner_table": "stock_catalog", "outer_alias": "empl", "inner_alias": "act", "proj_col": "name", "join_col": "id", "correlated_ref": "empl.id", "token_group": "T1", "fan_out": 1 }
v3
Schema: cost_centers (alias: dept)(status, code, id, amount) area_registry(type, salary, status, amount) Task: Find code from cost_centers where amount exceeds the average amount from area_registry for the same id. SQL:
SELECT code FROM cost_centers AS dept WHERE amount > ( SELECT AVG(amount) FROM area_registry AS act WHERE act.id = dept.id );
{ "outer_table": "cost_centers", "inner_table": "area_registry", "outer_alias": "dept", "inner_alias": "act", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "dept.id", "token_group": "T1", "fan_out": 1 }
v1
Schema: personnel_registry (alias: emp)(value, id, level, code) activity_log(name, date, id, amount) Task: Find id from personnel_registry where code appears in activity_log entries with matching code. SQL:
SELECT id FROM personnel_registry AS emp WHERE code IN ( SELECT code FROM activity_log AS txn WHERE txn.code = emp.code );
{ "outer_table": "personnel_registry", "inner_table": "activity_log", "outer_alias": "emp", "inner_alias": "txn", "proj_col": "id", "filter_col": "code", "join_col": "code", "correlated_ref": "emp.code", "token_group": "T1", "fan_out": 1 }
v3
Schema: cost_centers (alias: dept)(status, value, date, name) attribute_groups(amount, level, id, type) Task: Select amount from cost_centers where amount is greater than the count of of salary in attribute_groups for matching code. SQL:
SELECT amount FROM cost_centers AS dept WHERE amount > ( SELECT COUNT(salary) FROM attribute_groups AS act WHERE act.code = dept.code );
{ "outer_table": "cost_centers", "inner_table": "attribute_groups", "outer_alias": "dept", "inner_alias": "act", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "dept.code", "token_group": "T1", "fan_out": 1 }
v2
Schema: engagement_log (alias: mgr)(code, type, salary, level) acquisition_log(salary, type, value, status) Task: Retrieve name from engagement_log that have at least one corresponding entry in acquisition_log sharing the same type. SQL:
SELECT name FROM engagement_log AS mgr WHERE EXISTS ( SELECT 1 FROM acquisition_log AS prj WHERE prj.type = mgr.type );
{ "outer_table": "engagement_log", "inner_table": "acquisition_log", "outer_alias": "mgr", "inner_alias": "prj", "proj_col": "name", "join_col": "type", "correlated_ref": "mgr.type", "token_group": "T2", "fan_out": 90 }
v2
Schema: receivables_log (alias: inv)(id, code, level, name) sourcing_list(name, id, value, date) Task: Find id from receivables_log where a matching record exists in sourcing_list with the same id. SQL:
SELECT id FROM receivables_log AS inv WHERE EXISTS ( SELECT 1 FROM sourcing_list AS prj WHERE prj.id = inv.id );
{ "outer_table": "receivables_log", "inner_table": "sourcing_list", "outer_alias": "inv", "inner_alias": "prj", "proj_col": "id", "join_col": "id", "correlated_ref": "inv.id", "token_group": "T2", "fan_out": 90 }
v2
Schema: workforce_data (alias: empl)(value, salary, code, status) dispatch_queue(type, name, salary, amount) Task: Retrieve value from workforce_data that have at least one corresponding entry in dispatch_queue sharing the same type. SQL:
SELECT value FROM workforce_data AS empl WHERE EXISTS ( SELECT 1 FROM dispatch_queue AS rgn WHERE rgn.type = empl.type );
{ "outer_table": "workforce_data", "inner_table": "dispatch_queue", "outer_alias": "empl", "inner_alias": "rgn", "proj_col": "value", "join_col": "type", "correlated_ref": "empl.type", "token_group": "T2", "fan_out": 60 }
v1
Schema: personnel_registry (alias: emp)(name, salary, id, status) engagement_log(amount, id, code, level) Task: Find name from personnel_registry where code appears in engagement_log entries with matching code. SQL:
SELECT name FROM personnel_registry AS emp WHERE code IN ( SELECT code FROM engagement_log AS brc WHERE brc.code = emp.code );
{ "outer_table": "personnel_registry", "inner_table": "engagement_log", "outer_alias": "emp", "inner_alias": "brc", "proj_col": "name", "filter_col": "code", "join_col": "code", "correlated_ref": "emp.code", "token_group": "T2", "fan_out": 50 }
v1
Schema: sales_registry (alias: usr)(id, date, type, salary) journal_entries(salary, level, id, date) Task: Retrieve name from sales_registry whose id is found in journal_entries rows where id matches the outer record. SQL:
SELECT name FROM sales_registry AS usr WHERE id IN ( SELECT id FROM journal_entries AS brc WHERE brc.id = usr.id );
{ "outer_table": "sales_registry", "inner_table": "journal_entries", "outer_alias": "usr", "inner_alias": "brc", "proj_col": "name", "filter_col": "id", "join_col": "id", "correlated_ref": "usr.id", "token_group": "T2", "fan_out": 50 }
v1
Schema: stock_catalog (alias: prod)(code, id, level, type) attribute_groups(type, amount, id, status) Task: Retrieve salary from stock_catalog whose level is found in attribute_groups rows where id matches the outer record. SQL:
SELECT salary FROM stock_catalog AS prod WHERE level IN ( SELECT level FROM attribute_groups AS emp WHERE emp.id = prod.id );
{ "outer_table": "stock_catalog", "inner_table": "attribute_groups", "outer_alias": "prod", "inner_alias": "emp", "proj_col": "salary", "filter_col": "level", "join_col": "id", "correlated_ref": "prod.id", "token_group": "T1", "fan_out": 1 }
v2
Schema: cost_centers (alias: dept)(value, date, name, id) workforce_data(amount, status, name, value) Task: Find amount from cost_centers where a matching record exists in workforce_data with the same code. SQL:
SELECT amount FROM cost_centers AS dept WHERE EXISTS ( SELECT 1 FROM workforce_data AS brc WHERE brc.code = dept.code );
{ "outer_table": "cost_centers", "inner_table": "workforce_data", "outer_alias": "dept", "inner_alias": "brc", "proj_col": "amount", "join_col": "code", "correlated_ref": "dept.code", "token_group": "T2", "fan_out": 50 }
v3
Schema: cost_centers (alias: dept)(salary, level, amount, type) sourcing_list(date, code, amount, status) Task: Select name from cost_centers where salary is greater than the average of salary in sourcing_list for matching id. SQL:
SELECT name FROM cost_centers AS dept WHERE salary > ( SELECT AVG(salary) FROM sourcing_list AS whs WHERE whs.id = dept.id );
{ "outer_table": "cost_centers", "inner_table": "sourcing_list", "outer_alias": "dept", "inner_alias": "whs", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "dept.id", "token_group": "T2", "fan_out": 65 }
v2
Schema: cost_centers (alias: dept)(date, name, code, status) workforce_data(salary, name, date, code) Task: Retrieve id from cost_centers that have at least one corresponding entry in workforce_data sharing the same code. SQL:
SELECT id FROM cost_centers AS dept WHERE EXISTS ( SELECT 1 FROM workforce_data AS prd WHERE prd.code = dept.code );
{ "outer_table": "cost_centers", "inner_table": "workforce_data", "outer_alias": "dept", "inner_alias": "prd", "proj_col": "id", "join_col": "code", "correlated_ref": "dept.code", "token_group": "T2", "fan_out": 90 }
v3
Schema: engagement_log (alias: mgr)(date, value, type, salary) cost_centers(value, name, id, status) Task: Find amount from engagement_log where value exceeds the minimum value from cost_centers for the same code. SQL:
SELECT amount FROM engagement_log AS mgr WHERE value > ( SELECT MIN(value) FROM cost_centers AS dpt WHERE dpt.code = mgr.code );
{ "outer_table": "engagement_log", "inner_table": "cost_centers", "outer_alias": "mgr", "inner_alias": "dpt", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "mgr.code", "token_group": "T2", "fan_out": 70 }
v2
Schema: engagement_log (alias: mgr)(amount, salary, name, id) facility_registry(id, status, salary, code) Task: Retrieve code from engagement_log that have at least one corresponding entry in facility_registry sharing the same level. SQL:
SELECT code FROM engagement_log AS mgr WHERE EXISTS ( SELECT 1 FROM facility_registry AS ctg WHERE ctg.level = mgr.level );
{ "outer_table": "engagement_log", "inner_table": "facility_registry", "outer_alias": "mgr", "inner_alias": "ctg", "proj_col": "code", "join_col": "level", "correlated_ref": "mgr.level", "token_group": "T2", "fan_out": 80 }
v2
Schema: cost_centers (alias: dept)(name, value, salary, id) acquisition_log(value, id, salary, status) Task: Retrieve value from cost_centers that have at least one corresponding entry in acquisition_log sharing the same id. SQL:
SELECT value FROM cost_centers AS dept WHERE EXISTS ( SELECT 1 FROM acquisition_log AS rgn WHERE rgn.id = dept.id );
{ "outer_table": "cost_centers", "inner_table": "acquisition_log", "outer_alias": "dept", "inner_alias": "rgn", "proj_col": "value", "join_col": "id", "correlated_ref": "dept.id", "token_group": "T2", "fan_out": 60 }
v3
Schema: personnel_registry (alias: emp)(code, level, name, type) sourcing_list(level, amount, id, type) Task: Find amount from personnel_registry where value exceeds the maximum value from sourcing_list for the same type. SQL:
SELECT amount FROM personnel_registry AS emp WHERE value > ( SELECT MAX(value) FROM sourcing_list AS cst WHERE cst.type = emp.type );
{ "outer_table": "personnel_registry", "inner_table": "sourcing_list", "outer_alias": "emp", "inner_alias": "cst", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "emp.type", "token_group": "T1", "fan_out": 1 }
v2
Schema: engagement_log (alias: mgr)(name, salary, code, value) sourcing_list(type, level, value, id) Task: Find value from engagement_log where a matching record exists in sourcing_list with the same type. SQL:
SELECT value FROM engagement_log AS mgr WHERE EXISTS ( SELECT 1 FROM sourcing_list AS ord WHERE ord.type = mgr.type );
{ "outer_table": "engagement_log", "inner_table": "sourcing_list", "outer_alias": "mgr", "inner_alias": "ord", "proj_col": "value", "join_col": "type", "correlated_ref": "mgr.type", "token_group": "T1", "fan_out": 1 }
v3
Schema: engagement_log (alias: mgr)(name, date, id, salary) facility_registry(id, date, code, value) Task: Find id from engagement_log where value exceeds the minimum salary from facility_registry for the same code. SQL:
SELECT id FROM engagement_log AS mgr WHERE value > ( SELECT MIN(salary) FROM facility_registry AS shp WHERE shp.code = mgr.code );
{ "outer_table": "engagement_log", "inner_table": "facility_registry", "outer_alias": "mgr", "inner_alias": "shp", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "mgr.code", "token_group": "T2", "fan_out": 85 }
v3
Schema: personnel_registry (alias: emp)(date, id, name, code) sales_queue(id, status, value, date) Task: Retrieve salary from personnel_registry with value above the COUNT(salary) of sales_queue rows sharing the same level. SQL:
SELECT salary FROM personnel_registry AS emp WHERE value > ( SELECT COUNT(salary) FROM sales_queue AS dpt WHERE dpt.level = emp.level );
{ "outer_table": "personnel_registry", "inner_table": "sales_queue", "outer_alias": "emp", "inner_alias": "dpt", "proj_col": "salary", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "emp.level", "token_group": "T2", "fan_out": 70 }
v2
Schema: workforce_data (alias: empl)(date, name, level, type) sales_registry(code, name, id, type) Task: Select name from workforce_data that have at least one matching row in sales_registry for the same level. SQL:
SELECT name FROM workforce_data AS empl WHERE EXISTS ( SELECT 1 FROM sales_registry AS rgn WHERE rgn.level = empl.level );
{ "outer_table": "workforce_data", "inner_table": "sales_registry", "outer_alias": "empl", "inner_alias": "rgn", "proj_col": "name", "join_col": "level", "correlated_ref": "empl.level", "token_group": "T2", "fan_out": 60 }
v1
Schema: receivables_log (alias: inv)(name, value, status, date) acquisition_log(name, level, code, amount) Task: Select salary from receivables_log where status exists in acquisition_log for the same type. SQL:
SELECT salary FROM receivables_log AS inv WHERE status IN ( SELECT status FROM acquisition_log AS ord WHERE ord.type = inv.type );
{ "outer_table": "receivables_log", "inner_table": "acquisition_log", "outer_alias": "inv", "inner_alias": "ord", "proj_col": "salary", "filter_col": "status", "join_col": "type", "correlated_ref": "inv.type", "token_group": "T1", "fan_out": 1 }
v1
Schema: cost_centers (alias: dept)(name, date, value, id) dispatch_queue(salary, id, level, type) Task: Select salary from cost_centers where type exists in dispatch_queue for the same level. SQL:
SELECT salary FROM cost_centers AS dept WHERE type IN ( SELECT type FROM dispatch_queue AS cst WHERE cst.level = dept.level );
{ "outer_table": "cost_centers", "inner_table": "dispatch_queue", "outer_alias": "dept", "inner_alias": "cst", "proj_col": "salary", "filter_col": "type", "join_col": "level", "correlated_ref": "dept.level", "token_group": "T1", "fan_out": 1 }
v2
Schema: workforce_data (alias: empl)(value, date, level, id) stock_catalog(id, type, status, level) Task: Find amount from workforce_data where a matching record exists in stock_catalog with the same type. SQL:
SELECT amount FROM workforce_data AS empl WHERE EXISTS ( SELECT 1 FROM stock_catalog AS rgn WHERE rgn.type = empl.type );
{ "outer_table": "workforce_data", "inner_table": "stock_catalog", "outer_alias": "empl", "inner_alias": "rgn", "proj_col": "amount", "join_col": "type", "correlated_ref": "empl.type", "token_group": "T2", "fan_out": 60 }
v1
Schema: workforce_data (alias: empl)(code, name, value, salary) attribute_groups(salary, id, type, level) Task: Retrieve id from workforce_data whose type is found in attribute_groups rows where code matches the outer record. SQL:
SELECT id FROM workforce_data AS empl WHERE type IN ( SELECT type FROM attribute_groups AS brc WHERE brc.code = empl.code );
{ "outer_table": "workforce_data", "inner_table": "attribute_groups", "outer_alias": "empl", "inner_alias": "brc", "proj_col": "id", "filter_col": "type", "join_col": "code", "correlated_ref": "empl.code", "token_group": "T2", "fan_out": 50 }
v3
Schema: sales_registry (alias: usr)(type, amount, id, level) sales_queue(status, date, code, id) Task: Select value from sales_registry where amount is greater than the total of value in sales_queue for matching level. SQL:
SELECT value FROM sales_registry AS usr WHERE amount > ( SELECT SUM(value) FROM sales_queue AS brc WHERE brc.level = usr.level );
{ "outer_table": "sales_registry", "inner_table": "sales_queue", "outer_alias": "usr", "inner_alias": "brc", "proj_col": "value", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "usr.level", "token_group": "T2", "fan_out": 50 }
v3
Schema: cost_centers (alias: dept)(type, level, salary, code) attribute_groups(date, id, amount, code) Task: Select salary from cost_centers where amount is greater than the total of value in attribute_groups for matching code. SQL:
SELECT salary FROM cost_centers AS dept WHERE amount > ( SELECT SUM(value) FROM attribute_groups AS ordr WHERE ordr.code = dept.code );
{ "outer_table": "cost_centers", "inner_table": "attribute_groups", "outer_alias": "dept", "inner_alias": "ordr", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "dept.code", "token_group": "T2", "fan_out": 95 }
v1
Schema: sales_registry (alias: usr)(name, salary, amount, value) acquisition_log(type, date, name, level) Task: Find id from sales_registry where status appears in acquisition_log entries with matching type. SQL:
SELECT id FROM sales_registry AS usr WHERE status IN ( SELECT status FROM acquisition_log AS txn WHERE txn.type = usr.type );
{ "outer_table": "sales_registry", "inner_table": "acquisition_log", "outer_alias": "usr", "inner_alias": "txn", "proj_col": "id", "filter_col": "status", "join_col": "type", "correlated_ref": "usr.type", "token_group": "T1", "fan_out": 1 }
v1
Schema: engagement_log (alias: mgr)(salary, id, status, level) portfolio_index(id, name, salary, status) Task: Retrieve id from engagement_log whose status is found in portfolio_index rows where id matches the outer record. SQL:
SELECT id FROM engagement_log AS mgr WHERE status IN ( SELECT status FROM portfolio_index AS cst WHERE cst.id = mgr.id );
{ "outer_table": "engagement_log", "inner_table": "portfolio_index", "outer_alias": "mgr", "inner_alias": "cst", "proj_col": "id", "filter_col": "status", "join_col": "id", "correlated_ref": "mgr.id", "token_group": "T1", "fan_out": 1 }
v1
Schema: sales_queue (alias: ord)(type, name, code, id) facility_registry(id, name, date, amount) Task: Select amount from sales_queue where id exists in facility_registry for the same code. SQL:
SELECT amount FROM sales_queue AS ord WHERE id IN ( SELECT id FROM facility_registry AS prd WHERE prd.code = ord.code );
{ "outer_table": "sales_queue", "inner_table": "facility_registry", "outer_alias": "ord", "inner_alias": "prd", "proj_col": "amount", "filter_col": "id", "join_col": "code", "correlated_ref": "ord.code", "token_group": "T2", "fan_out": 90 }
v2
Schema: stock_catalog (alias: prod)(value, type, name, amount) acquisition_log(code, salary, date, level) Task: Retrieve amount from stock_catalog that have at least one corresponding entry in acquisition_log sharing the same status. SQL:
SELECT amount FROM stock_catalog AS prod WHERE EXISTS ( SELECT 1 FROM acquisition_log AS ctg WHERE ctg.status = prod.status );
{ "outer_table": "stock_catalog", "inner_table": "acquisition_log", "outer_alias": "prod", "inner_alias": "ctg", "proj_col": "amount", "join_col": "status", "correlated_ref": "prod.status", "token_group": "T2", "fan_out": 80 }
v3
Schema: receivables_log (alias: inv)(date, type, amount, id) acquisition_log(type, code, id, name) Task: Select code from receivables_log where value is greater than the total of amount in acquisition_log for matching type. SQL:
SELECT code FROM receivables_log AS inv WHERE value > ( SELECT SUM(amount) FROM acquisition_log AS prd WHERE prd.type = inv.type );
{ "outer_table": "receivables_log", "inner_table": "acquisition_log", "outer_alias": "inv", "inner_alias": "prd", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "inv.type", "token_group": "T2", "fan_out": 90 }
v3
Schema: stock_catalog (alias: prod)(value, date, level, amount) dispatch_queue(level, status, code, salary) Task: Select name from stock_catalog where amount is greater than the maximum of amount in dispatch_queue for matching status. SQL:
SELECT name FROM stock_catalog AS prod WHERE amount > ( SELECT MAX(amount) FROM dispatch_queue AS tsk WHERE tsk.status = prod.status );
{ "outer_table": "stock_catalog", "inner_table": "dispatch_queue", "outer_alias": "prod", "inner_alias": "tsk", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "prod.status", "token_group": "T2", "fan_out": 55 }
v3
Schema: personnel_registry (alias: emp)(level, id, value, salary) sales_registry(type, level, date, status) Task: Find amount from personnel_registry where salary exceeds the total value from sales_registry for the same id. SQL:
SELECT amount FROM personnel_registry AS emp WHERE salary > ( SELECT SUM(value) FROM sales_registry AS tsk WHERE tsk.id = emp.id );
{ "outer_table": "personnel_registry", "inner_table": "sales_registry", "outer_alias": "emp", "inner_alias": "tsk", "proj_col": "amount", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "emp.id", "token_group": "T2", "fan_out": 55 }
v3
Schema: personnel_registry (alias: emp)(id, name, salary, level) activity_log(level, amount, date, id) Task: Find amount from personnel_registry where amount exceeds the maximum value from activity_log for the same code. SQL:
SELECT amount FROM personnel_registry AS emp WHERE amount > ( SELECT MAX(value) FROM activity_log AS empl WHERE empl.code = emp.code );
{ "outer_table": "personnel_registry", "inner_table": "activity_log", "outer_alias": "emp", "inner_alias": "empl", "proj_col": "amount", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "emp.code", "token_group": "T2", "fan_out": 110 }
v1
Schema: sales_queue (alias: ord)(id, salary, status, level) portfolio_index(value, salary, level, status) Task: Find name from sales_queue where level appears in portfolio_index entries with matching status. SQL:
SELECT name FROM sales_queue AS ord WHERE level IN ( SELECT level FROM portfolio_index AS rgn WHERE rgn.status = ord.status );
{ "outer_table": "sales_queue", "inner_table": "portfolio_index", "outer_alias": "ord", "inner_alias": "rgn", "proj_col": "name", "filter_col": "level", "join_col": "status", "correlated_ref": "ord.status", "token_group": "T2", "fan_out": 60 }
v3
Schema: sales_registry (alias: usr)(name, value, status, salary) workforce_data(date, status, id, amount) Task: Select code from sales_registry where value is greater than the total of salary in workforce_data for matching status. SQL:
SELECT code FROM sales_registry AS usr WHERE value > ( SELECT SUM(salary) FROM workforce_data AS ctg WHERE ctg.status = usr.status );
{ "outer_table": "sales_registry", "inner_table": "workforce_data", "outer_alias": "usr", "inner_alias": "ctg", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "usr.status", "token_group": "T2", "fan_out": 80 }
v2
Schema: workforce_data (alias: empl)(amount, id, date, value) sourcing_list(id, level, date, amount) Task: Retrieve salary from workforce_data that have at least one corresponding entry in sourcing_list sharing the same type. SQL:
SELECT salary FROM workforce_data AS empl WHERE EXISTS ( SELECT 1 FROM sourcing_list AS ordr WHERE ordr.type = empl.type );
{ "outer_table": "workforce_data", "inner_table": "sourcing_list", "outer_alias": "empl", "inner_alias": "ordr", "proj_col": "salary", "join_col": "type", "correlated_ref": "empl.type", "token_group": "T2", "fan_out": 95 }
v3
Schema: stock_catalog (alias: prod)(name, status, salary, type) acquisition_log(status, salary, level, code) Task: Retrieve name from stock_catalog with salary above the MIN(value) of acquisition_log rows sharing the same id. SQL:
SELECT name FROM stock_catalog AS prod WHERE salary > ( SELECT MIN(value) FROM acquisition_log AS brc WHERE brc.id = prod.id );
{ "outer_table": "stock_catalog", "inner_table": "acquisition_log", "outer_alias": "prod", "inner_alias": "brc", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "prod.id", "token_group": "T2", "fan_out": 50 }
v3
Schema: personnel_registry (alias: emp)(amount, salary, value, type) journal_entries(name, value, code, date) Task: Retrieve value from personnel_registry with salary above the MAX(value) of journal_entries rows sharing the same type. SQL:
SELECT value FROM personnel_registry AS emp WHERE salary > ( SELECT MAX(value) FROM journal_entries AS ordr WHERE ordr.type = emp.type );
{ "outer_table": "personnel_registry", "inner_table": "journal_entries", "outer_alias": "emp", "inner_alias": "ordr", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "emp.type", "token_group": "T2", "fan_out": 95 }
v2
Schema: sales_queue (alias: ord)(value, salary, amount, name) acquisition_log(value, name, salary, level) Task: Select value from sales_queue that have at least one matching row in acquisition_log for the same status. SQL:
SELECT value FROM sales_queue AS ord WHERE EXISTS ( SELECT 1 FROM acquisition_log AS tsk WHERE tsk.status = ord.status );
{ "outer_table": "sales_queue", "inner_table": "acquisition_log", "outer_alias": "ord", "inner_alias": "tsk", "proj_col": "value", "join_col": "status", "correlated_ref": "ord.status", "token_group": "T2", "fan_out": 55 }
v3
Schema: personnel_registry (alias: emp)(date, type, value, salary) sourcing_list(amount, status, value, type) Task: Retrieve code from personnel_registry with salary above the MIN(amount) of sourcing_list rows sharing the same level. SQL:
SELECT code FROM personnel_registry AS emp WHERE salary > ( SELECT MIN(amount) FROM sourcing_list AS ctg WHERE ctg.level = emp.level );
{ "outer_table": "personnel_registry", "inner_table": "sourcing_list", "outer_alias": "emp", "inner_alias": "ctg", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "emp.level", "token_group": "T2", "fan_out": 80 }
v1
Schema: receivables_log (alias: inv)(type, value, name, date) sourcing_list(date, code, status, level) Task: Retrieve name from receivables_log whose status is found in sourcing_list rows where status matches the outer record. SQL:
SELECT name FROM receivables_log AS inv WHERE status IN ( SELECT status FROM sourcing_list AS rgn WHERE rgn.status = inv.status );
{ "outer_table": "receivables_log", "inner_table": "sourcing_list", "outer_alias": "inv", "inner_alias": "rgn", "proj_col": "name", "filter_col": "status", "join_col": "status", "correlated_ref": "inv.status", "token_group": "T2", "fan_out": 60 }
v3
Schema: workforce_data (alias: empl)(salary, code, date, status) sales_queue(name, id, code, value) Task: Retrieve value from workforce_data with value above the AVG(value) of sales_queue rows sharing the same id. SQL:
SELECT value FROM workforce_data AS empl WHERE value > ( SELECT AVG(value) FROM sales_queue AS brc WHERE brc.id = empl.id );
{ "outer_table": "workforce_data", "inner_table": "sales_queue", "outer_alias": "empl", "inner_alias": "brc", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "empl.id", "token_group": "T2", "fan_out": 50 }
v3
Schema: personnel_registry (alias: emp)(level, status, amount, date) area_registry(amount, status, type, value) Task: Retrieve value from personnel_registry with amount above the AVG(amount) of area_registry rows sharing the same type. SQL:
SELECT value FROM personnel_registry AS emp WHERE amount > ( SELECT AVG(amount) FROM area_registry AS spl WHERE spl.type = emp.type );
{ "outer_table": "personnel_registry", "inner_table": "area_registry", "outer_alias": "emp", "inner_alias": "spl", "proj_col": "value", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "emp.type", "token_group": "T1", "fan_out": 1 }
v2
Schema: personnel_registry (alias: emp)(date, name, level, amount) area_registry(code, type, amount, salary) Task: Select name from personnel_registry that have at least one matching row in area_registry for the same level. SQL:
SELECT name FROM personnel_registry AS emp WHERE EXISTS ( SELECT 1 FROM area_registry AS act WHERE act.level = emp.level );
{ "outer_table": "personnel_registry", "inner_table": "area_registry", "outer_alias": "emp", "inner_alias": "act", "proj_col": "name", "join_col": "level", "correlated_ref": "emp.level", "token_group": "T1", "fan_out": 1 }
v3
Schema: engagement_log (alias: mgr)(name, amount, status, id) sourcing_list(date, level, type, salary) Task: Find value from engagement_log where amount exceeds the count of value from sourcing_list for the same status. SQL:
SELECT value FROM engagement_log AS mgr WHERE amount > ( SELECT COUNT(value) FROM sourcing_list AS dpt WHERE dpt.status = mgr.status );
{ "outer_table": "engagement_log", "inner_table": "sourcing_list", "outer_alias": "mgr", "inner_alias": "dpt", "proj_col": "value", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "mgr.status", "token_group": "T2", "fan_out": 70 }
v1
Schema: stock_catalog (alias: prod)(status, value, id, amount) receivables_log(id, salary, value, type) Task: Select id from stock_catalog where id exists in receivables_log for the same type. SQL:
SELECT id FROM stock_catalog AS prod WHERE id IN ( SELECT id FROM receivables_log AS brc WHERE brc.type = prod.type );
{ "outer_table": "stock_catalog", "inner_table": "receivables_log", "outer_alias": "prod", "inner_alias": "brc", "proj_col": "id", "filter_col": "id", "join_col": "type", "correlated_ref": "prod.type", "token_group": "T2", "fan_out": 50 }
v3
Schema: stock_catalog (alias: prod)(level, value, code, name) sales_queue(salary, id, status, name) Task: Select amount from stock_catalog where amount is greater than the count of of salary in sales_queue for matching code. SQL:
SELECT amount FROM stock_catalog AS prod WHERE amount > ( SELECT COUNT(salary) FROM sales_queue AS brc WHERE brc.code = prod.code );
{ "outer_table": "stock_catalog", "inner_table": "sales_queue", "outer_alias": "prod", "inner_alias": "brc", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "prod.code", "token_group": "T2", "fan_out": 50 }
v1
Schema: sales_queue (alias: ord)(level, value, id, code) workforce_data(salary, amount, date, type) Task: Find amount from sales_queue where code appears in workforce_data entries with matching level. SQL:
SELECT amount FROM sales_queue AS ord WHERE code IN ( SELECT code FROM workforce_data AS shp WHERE shp.level = ord.level );
{ "outer_table": "sales_queue", "inner_table": "workforce_data", "outer_alias": "ord", "inner_alias": "shp", "proj_col": "amount", "filter_col": "code", "join_col": "level", "correlated_ref": "ord.level", "token_group": "T2", "fan_out": 85 }
v1
Schema: cost_centers (alias: dept)(status, salary, date, amount) portfolio_index(value, amount, type, level) Task: Select amount from cost_centers where id exists in portfolio_index for the same code. SQL:
SELECT amount FROM cost_centers AS dept WHERE id IN ( SELECT id FROM portfolio_index AS cst WHERE cst.code = dept.code );
{ "outer_table": "cost_centers", "inner_table": "portfolio_index", "outer_alias": "dept", "inner_alias": "cst", "proj_col": "amount", "filter_col": "id", "join_col": "code", "correlated_ref": "dept.code", "token_group": "T1", "fan_out": 1 }
v1
Schema: workforce_data (alias: empl)(id, level, status, value) stocking_sites(salary, id, level, value) Task: Select salary from workforce_data where type exists in stocking_sites for the same code. SQL:
SELECT salary FROM workforce_data AS empl WHERE type IN ( SELECT type FROM stocking_sites AS emp WHERE emp.code = empl.code );
{ "outer_table": "workforce_data", "inner_table": "stocking_sites", "outer_alias": "empl", "inner_alias": "emp", "proj_col": "salary", "filter_col": "type", "join_col": "code", "correlated_ref": "empl.code", "token_group": "T1", "fan_out": 1 }
v3
Schema: cost_centers (alias: dept)(value, salary, name, code) portfolio_index(code, id, type, name) Task: Find id from cost_centers where amount exceeds the total salary from portfolio_index for the same level. SQL:
SELECT id FROM cost_centers AS dept WHERE amount > ( SELECT SUM(salary) FROM portfolio_index AS cst WHERE cst.level = dept.level );
{ "outer_table": "cost_centers", "inner_table": "portfolio_index", "outer_alias": "dept", "inner_alias": "cst", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "dept.level", "token_group": "T1", "fan_out": 1 }
v1
Schema: receivables_log (alias: inv)(code, salary, value, amount) cost_centers(name, amount, code, level) Task: Select name from receivables_log where id exists in cost_centers for the same level. SQL:
SELECT name FROM receivables_log AS inv WHERE id IN ( SELECT id FROM cost_centers AS ordr WHERE ordr.level = inv.level );
{ "outer_table": "receivables_log", "inner_table": "cost_centers", "outer_alias": "inv", "inner_alias": "ordr", "proj_col": "name", "filter_col": "id", "join_col": "level", "correlated_ref": "inv.level", "token_group": "T2", "fan_out": 95 }
v3
Schema: receivables_log (alias: inv)(name, date, level, salary) personnel_registry(type, status, level, name) Task: Select id from receivables_log where value is greater than the maximum of salary in personnel_registry for matching level. SQL:
SELECT id FROM receivables_log AS inv WHERE value > ( SELECT MAX(salary) FROM personnel_registry AS act WHERE act.level = inv.level );
{ "outer_table": "receivables_log", "inner_table": "personnel_registry", "outer_alias": "inv", "inner_alias": "act", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "inv.level", "token_group": "T1", "fan_out": 1 }
v2
Schema: sales_registry (alias: usr)(salary, id, amount, date) engagement_log(level, id, type, date) Task: Retrieve value from sales_registry that have at least one corresponding entry in engagement_log sharing the same id. SQL:
SELECT value FROM sales_registry AS usr WHERE EXISTS ( SELECT 1 FROM engagement_log AS cst WHERE cst.id = usr.id );
{ "outer_table": "sales_registry", "inner_table": "engagement_log", "outer_alias": "usr", "inner_alias": "cst", "proj_col": "value", "join_col": "id", "correlated_ref": "usr.id", "token_group": "T1", "fan_out": 1 }
v1
Schema: stock_catalog (alias: prod)(salary, type, date, level) stocking_sites(salary, date, name, level) Task: Retrieve amount from stock_catalog whose level is found in stocking_sites rows where status matches the outer record. SQL:
SELECT amount FROM stock_catalog AS prod WHERE level IN ( SELECT level FROM stocking_sites AS inv WHERE inv.status = prod.status );
{ "outer_table": "stock_catalog", "inner_table": "stocking_sites", "outer_alias": "prod", "inner_alias": "inv", "proj_col": "amount", "filter_col": "level", "join_col": "status", "correlated_ref": "prod.status", "token_group": "T1", "fan_out": 1 }
v2
Schema: cost_centers (alias: dept)(salary, code, amount, level) sourcing_list(level, amount, name, code) Task: Find id from cost_centers where a matching record exists in sourcing_list with the same code. SQL:
SELECT id FROM cost_centers AS dept WHERE EXISTS ( SELECT 1 FROM sourcing_list AS ord WHERE ord.code = dept.code );
{ "outer_table": "cost_centers", "inner_table": "sourcing_list", "outer_alias": "dept", "inner_alias": "ord", "proj_col": "id", "join_col": "code", "correlated_ref": "dept.code", "token_group": "T1", "fan_out": 1 }
v2
Schema: stock_catalog (alias: prod)(value, level, date, id) stocking_sites(code, name, id, amount) Task: Find amount from stock_catalog where a matching record exists in stocking_sites with the same type. SQL:
SELECT amount FROM stock_catalog AS prod WHERE EXISTS ( SELECT 1 FROM stocking_sites AS ordr WHERE ordr.type = prod.type );
{ "outer_table": "stock_catalog", "inner_table": "stocking_sites", "outer_alias": "prod", "inner_alias": "ordr", "proj_col": "amount", "join_col": "type", "correlated_ref": "prod.type", "token_group": "T2", "fan_out": 95 }
v2
Schema: receivables_log (alias: inv)(name, value, type, level) acquisition_log(value, date, id, type) Task: Retrieve code from receivables_log that have at least one corresponding entry in acquisition_log sharing the same type. SQL:
SELECT code FROM receivables_log AS inv WHERE EXISTS ( SELECT 1 FROM acquisition_log AS empl WHERE empl.type = inv.type );
{ "outer_table": "receivables_log", "inner_table": "acquisition_log", "outer_alias": "inv", "inner_alias": "empl", "proj_col": "code", "join_col": "type", "correlated_ref": "inv.type", "token_group": "T2", "fan_out": 110 }
v1
Schema: receivables_log (alias: inv)(code, date, name, value) engagement_log(id, value, amount, name) Task: Find id from receivables_log where code appears in engagement_log entries with matching level. SQL:
SELECT id FROM receivables_log AS inv WHERE code IN ( SELECT code FROM engagement_log AS act WHERE act.level = inv.level );
{ "outer_table": "receivables_log", "inner_table": "engagement_log", "outer_alias": "inv", "inner_alias": "act", "proj_col": "id", "filter_col": "code", "join_col": "level", "correlated_ref": "inv.level", "token_group": "T1", "fan_out": 1 }
v3
Schema: engagement_log (alias: mgr)(status, level, name, code) activity_log(salary, value, level, type) Task: Retrieve id from engagement_log with salary above the SUM(amount) of activity_log rows sharing the same code. SQL:
SELECT id FROM engagement_log AS mgr WHERE salary > ( SELECT SUM(amount) FROM activity_log AS ord WHERE ord.code = mgr.code );
{ "outer_table": "engagement_log", "inner_table": "activity_log", "outer_alias": "mgr", "inner_alias": "ord", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "mgr.code", "token_group": "T1", "fan_out": 1 }
v3
Schema: sales_registry (alias: usr)(status, salary, date, type) acquisition_log(name, status, code, value) Task: Find code from sales_registry where salary exceeds the minimum salary from acquisition_log for the same level. SQL:
SELECT code FROM sales_registry AS usr WHERE salary > ( SELECT MIN(salary) FROM acquisition_log AS txn WHERE txn.level = usr.level );
{ "outer_table": "sales_registry", "inner_table": "acquisition_log", "outer_alias": "usr", "inner_alias": "txn", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "usr.level", "token_group": "T1", "fan_out": 1 }
v3
Schema: workforce_data (alias: empl)(id, status, type, value) sourcing_list(date, status, name, value) Task: Find salary from workforce_data where salary exceeds the minimum value from sourcing_list for the same type. SQL:
SELECT salary FROM workforce_data AS empl WHERE salary > ( SELECT MIN(value) FROM sourcing_list AS rgn WHERE rgn.type = empl.type );
{ "outer_table": "workforce_data", "inner_table": "sourcing_list", "outer_alias": "empl", "inner_alias": "rgn", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "empl.type", "token_group": "T2", "fan_out": 60 }
v1
Schema: cost_centers (alias: dept)(level, status, code, date) sales_queue(status, amount, type, date) Task: Find name from cost_centers where code appears in sales_queue entries with matching type. SQL:
SELECT name FROM cost_centers AS dept WHERE code IN ( SELECT code FROM sales_queue AS empl WHERE empl.type = dept.type );
{ "outer_table": "cost_centers", "inner_table": "sales_queue", "outer_alias": "dept", "inner_alias": "empl", "proj_col": "name", "filter_col": "code", "join_col": "type", "correlated_ref": "dept.type", "token_group": "T2", "fan_out": 110 }
v3
Schema: workforce_data (alias: empl)(amount, type, value, status) dispatch_queue(date, id, type, code) Task: Retrieve code from workforce_data with amount above the MAX(salary) of dispatch_queue rows sharing the same type. SQL:
SELECT code FROM workforce_data AS empl WHERE amount > ( SELECT MAX(salary) FROM dispatch_queue AS shp WHERE shp.type = empl.type );
{ "outer_table": "workforce_data", "inner_table": "dispatch_queue", "outer_alias": "empl", "inner_alias": "shp", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "empl.type", "token_group": "T2", "fan_out": 85 }
v2
Schema: stock_catalog (alias: prod)(level, amount, name, code) personnel_registry(date, type, name, status) Task: Select code from stock_catalog that have at least one matching row in personnel_registry for the same type. SQL:
SELECT code FROM stock_catalog AS prod WHERE EXISTS ( SELECT 1 FROM personnel_registry AS act WHERE act.type = prod.type );
{ "outer_table": "stock_catalog", "inner_table": "personnel_registry", "outer_alias": "prod", "inner_alias": "act", "proj_col": "code", "join_col": "type", "correlated_ref": "prod.type", "token_group": "T1", "fan_out": 1 }
v2
Schema: personnel_registry (alias: emp)(date, salary, code, level) engagement_log(name, type, salary, id) Task: Find amount from personnel_registry where a matching record exists in engagement_log with the same type. SQL:
SELECT amount FROM personnel_registry AS emp WHERE EXISTS ( SELECT 1 FROM engagement_log AS brc WHERE brc.type = emp.type );
{ "outer_table": "personnel_registry", "inner_table": "engagement_log", "outer_alias": "emp", "inner_alias": "brc", "proj_col": "amount", "join_col": "type", "correlated_ref": "emp.type", "token_group": "T2", "fan_out": 50 }
v2
Schema: engagement_log (alias: mgr)(id, code, amount, date) personnel_registry(value, id, name, code) Task: Retrieve code from engagement_log that have at least one corresponding entry in personnel_registry sharing the same type. SQL:
SELECT code FROM engagement_log AS mgr WHERE EXISTS ( SELECT 1 FROM personnel_registry AS emp WHERE emp.type = mgr.type );
{ "outer_table": "engagement_log", "inner_table": "personnel_registry", "outer_alias": "mgr", "inner_alias": "emp", "proj_col": "code", "join_col": "type", "correlated_ref": "mgr.type", "token_group": "T1", "fan_out": 1 }
v3
Schema: sales_queue (alias: ord)(id, amount, type, date) portfolio_index(name, salary, date, amount) Task: Select amount from sales_queue where salary is greater than the minimum of salary in portfolio_index for matching status. SQL:
SELECT amount FROM sales_queue AS ord WHERE salary > ( SELECT MIN(salary) FROM portfolio_index AS rgn WHERE rgn.status = ord.status );
{ "outer_table": "sales_queue", "inner_table": "portfolio_index", "outer_alias": "ord", "inner_alias": "rgn", "proj_col": "amount", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "ord.status", "token_group": "T2", "fan_out": 60 }
v1
Schema: cost_centers (alias: dept)(level, id, value, type) sourcing_list(date, id, name, amount) Task: Select amount from cost_centers where status exists in sourcing_list for the same id. SQL:
SELECT amount FROM cost_centers AS dept WHERE status IN ( SELECT status FROM sourcing_list AS tsk WHERE tsk.id = dept.id );
{ "outer_table": "cost_centers", "inner_table": "sourcing_list", "outer_alias": "dept", "inner_alias": "tsk", "proj_col": "amount", "filter_col": "status", "join_col": "id", "correlated_ref": "dept.id", "token_group": "T2", "fan_out": 55 }
v1
Schema: receivables_log (alias: inv)(level, date, code, status) attribute_groups(date, value, salary, status) Task: Find id from receivables_log where type appears in attribute_groups entries with matching level. SQL:
SELECT id FROM receivables_log AS inv WHERE type IN ( SELECT type FROM attribute_groups AS txn WHERE txn.level = inv.level );
{ "outer_table": "receivables_log", "inner_table": "attribute_groups", "outer_alias": "inv", "inner_alias": "txn", "proj_col": "id", "filter_col": "type", "join_col": "level", "correlated_ref": "inv.level", "token_group": "T1", "fan_out": 1 }
v3
Schema: cost_centers (alias: dept)(date, amount, name, salary) journal_entries(amount, code, level, status) Task: Find amount from cost_centers where value exceeds the total value from journal_entries for the same level. SQL:
SELECT amount FROM cost_centers AS dept WHERE value > ( SELECT SUM(value) FROM journal_entries AS act WHERE act.level = dept.level );
{ "outer_table": "cost_centers", "inner_table": "journal_entries", "outer_alias": "dept", "inner_alias": "act", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "dept.level", "token_group": "T1", "fan_out": 1 }
v1
Schema: workforce_data (alias: empl)(code, level, name, amount) sourcing_list(level, amount, code, value) Task: Select code from workforce_data where status exists in sourcing_list for the same level. SQL:
SELECT code FROM workforce_data AS empl WHERE status IN ( SELECT status FROM sourcing_list AS spl WHERE spl.level = empl.level );
{ "outer_table": "workforce_data", "inner_table": "sourcing_list", "outer_alias": "empl", "inner_alias": "spl", "proj_col": "code", "filter_col": "status", "join_col": "level", "correlated_ref": "empl.level", "token_group": "T1", "fan_out": 1 }
v2
Schema: engagement_log (alias: mgr)(amount, status, id, type) sales_registry(amount, date, type, salary) Task: Select code from engagement_log that have at least one matching row in sales_registry for the same type. SQL:
SELECT code FROM engagement_log AS mgr WHERE EXISTS ( SELECT 1 FROM sales_registry AS inv WHERE inv.type = mgr.type );
{ "outer_table": "engagement_log", "inner_table": "sales_registry", "outer_alias": "mgr", "inner_alias": "inv", "proj_col": "code", "join_col": "type", "correlated_ref": "mgr.type", "token_group": "T1", "fan_out": 1 }
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
-