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