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