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