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