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