| [ | |
| { | |
| "db_id": "architecture", | |
| "query": "SELECT count(*) FROM architect WHERE gender = 'female'", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "architect", | |
| "WHERE", | |
| "gender", | |
| "=", | |
| "'female", | |
| "'" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "architect", | |
| "where", | |
| "gender", | |
| "=", | |
| "value" | |
| ], | |
| "question": "¿Cuántos arquitectos son ''female''?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"female\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "architecture", | |
| "query": "SELECT name , nationality , id FROM architect WHERE gender = 'male' ORDER BY name", | |
| "query_toks": [ | |
| "SELECT", | |
| "name", | |
| ",", | |
| "nationality", | |
| ",", | |
| "id", | |
| "FROM", | |
| "architect", | |
| "WHERE", | |
| "gender", | |
| "=", | |
| "'male", | |
| "'", | |
| "ORDER", | |
| "BY", | |
| "name" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "name", | |
| ",", | |
| "nationality", | |
| ",", | |
| "id", | |
| "from", | |
| "architect", | |
| "where", | |
| "gender", | |
| "=", | |
| "value", | |
| "order", | |
| "by", | |
| "name" | |
| ], | |
| "question": "Enumere el nombre, la nacionalidad y la identificación de todos los arquitectos ''male'' ordenados por sus nombres de forma lexicográfica.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"male\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "architecture", | |
| "query": "SELECT max(T1.length_meters) , T2.name FROM bridge AS T1 JOIN architect AS T2 ON T1.architect_id = T2.id", | |
| "query_toks": [ | |
| "SELECT", | |
| "max", | |
| "(", | |
| "T1.length_meters", | |
| ")", | |
| ",", | |
| "T2.name", | |
| "FROM", | |
| "bridge", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "architect", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.architect_id", | |
| "=", | |
| "T2.id" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "max", | |
| "(", | |
| "t1", | |
| ".", | |
| "length_meters", | |
| ")", | |
| ",", | |
| "t2", | |
| ".", | |
| "name", | |
| "from", | |
| "bridge", | |
| "as", | |
| "t1", | |
| "join", | |
| "architect", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "architect_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "id" | |
| ], | |
| "question": "¿Cuál es la longitud máxima en metros de los puentes y cómo se llaman los arquitectos?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 1, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "architecture", | |
| "query": "SELECT avg(length_feet) FROM bridge", | |
| "query_toks": [ | |
| "SELECT", | |
| "avg", | |
| "(", | |
| "length_feet", | |
| ")", | |
| "FROM", | |
| "bridge" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "avg", | |
| "(", | |
| "length_feet", | |
| ")", | |
| "from", | |
| "bridge" | |
| ], | |
| "question": "¿Cuál es la longitud media en pies de los puentes?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 5, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "architecture", | |
| "query": "SELECT name , built_year FROM mill WHERE TYPE = 'Grondzeiler'", | |
| "query_toks": [ | |
| "SELECT", | |
| "name", | |
| ",", | |
| "built_year", | |
| "FROM", | |
| "mill", | |
| "WHERE", | |
| "TYPE", | |
| "=", | |
| "'Grondzeiler", | |
| "'" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "name", | |
| ",", | |
| "built_year", | |
| "from", | |
| "mill", | |
| "where", | |
| "type", | |
| "=", | |
| "value" | |
| ], | |
| "question": "¿Cuáles son los nombres y el año de construcción de los molinos de tipo \"Grondzeiler\"?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Grondzeiler\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "architecture", | |
| "query": "SELECT DISTINCT T1.name , T1.nationality FROM architect AS T1 JOIN mill AS t2 ON T1.id = T2.architect_id", | |
| "query_toks": [ | |
| "SELECT", | |
| "DISTINCT", | |
| "T1.name", | |
| ",", | |
| "T1.nationality", | |
| "FROM", | |
| "architect", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "mill", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "T1.id", | |
| "=", | |
| "T2.architect_id" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "distinct", | |
| "t1", | |
| ".", | |
| "name", | |
| ",", | |
| "t1", | |
| ".", | |
| "nationality", | |
| "from", | |
| "architect", | |
| "as", | |
| "t1", | |
| "join", | |
| "mill", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "id", | |
| "=", | |
| "t2", | |
| ".", | |
| "architect_id" | |
| ], | |
| "question": "¿Cuáles son los distintos nombres y nacionalidades de los arquitectos que alguna vez han construido un molino?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ], | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| true, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "architecture", | |
| "query": "SELECT name FROM mill WHERE LOCATION != 'Donceel'", | |
| "query_toks": [ | |
| "SELECT", | |
| "name", | |
| "FROM", | |
| "mill", | |
| "WHERE", | |
| "LOCATION", | |
| "!", | |
| "=", | |
| "'Donceel", | |
| "'" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "name", | |
| "from", | |
| "mill", | |
| "where", | |
| "location", | |
| "!", | |
| "=", | |
| "value" | |
| ], | |
| "question": "¿Cuáles son los nombres de los molinos que no se encuentran en 'Donceel'?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 7, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Donceel\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "architecture", | |
| "query": "SELECT DISTINCT T1.type FROM mill AS T1 JOIN architect AS t2 ON T1.architect_id = T2.id WHERE T2.nationality = 'American' OR T2.nationality = 'Canadian'", | |
| "query_toks": [ | |
| "SELECT", | |
| "DISTINCT", | |
| "T1.type", | |
| "FROM", | |
| "mill", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "architect", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "T1.architect_id", | |
| "=", | |
| "T2.id", | |
| "WHERE", | |
| "T2.nationality", | |
| "=", | |
| "'American", | |
| "'", | |
| "OR", | |
| "T2.nationality", | |
| "=", | |
| "'Canadian", | |
| "'" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "distinct", | |
| "t1", | |
| ".", | |
| "type", | |
| "from", | |
| "mill", | |
| "as", | |
| "t1", | |
| "join", | |
| "architect", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "architect_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "id", | |
| "where", | |
| "t2", | |
| ".", | |
| "nationality", | |
| "=", | |
| "value", | |
| "or", | |
| "t2", | |
| ".", | |
| "nationality", | |
| "=", | |
| "value" | |
| ], | |
| "question": "¿Cuáles son los distintos tipos de molinos que construyen arquitectos ''American'' o ''Canadians''?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| true, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"American\"", | |
| null | |
| ], | |
| "or", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Canadian\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "architecture", | |
| "query": "SELECT T1.id , T1.name FROM architect AS T1 JOIN bridge AS T2 ON T1.id = T2.architect_id GROUP BY T1.id HAVING count(*) >= 3", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.id", | |
| ",", | |
| "T1.name", | |
| "FROM", | |
| "architect", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "bridge", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.id", | |
| "=", | |
| "T2.architect_id", | |
| "GROUP", | |
| "BY", | |
| "T1.id", | |
| "HAVING", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ">", | |
| "=", | |
| "3" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "id", | |
| ",", | |
| "t1", | |
| ".", | |
| "name", | |
| "from", | |
| "architect", | |
| "as", | |
| "t1", | |
| "join", | |
| "bridge", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "id", | |
| "=", | |
| "t2", | |
| ".", | |
| "architect_id", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "id", | |
| "having", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ">", | |
| "=", | |
| "value" | |
| ], | |
| "question": "¿Cuáles son las identificaciones y nombres de los arquitectos que construyeron al menos 3 puentes?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ], | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ] | |
| ], | |
| "having": [ | |
| [ | |
| false, | |
| 5, | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ], | |
| 3.0, | |
| null | |
| ] | |
| ], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "architecture", | |
| "query": "SELECT T1.id , T1.name , T1.nationality FROM architect AS T1 JOIN mill AS T2 ON T1.id = T2.architect_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.id", | |
| ",", | |
| "T1.name", | |
| ",", | |
| "T1.nationality", | |
| "FROM", | |
| "architect", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "mill", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.id", | |
| "=", | |
| "T2.architect_id", | |
| "GROUP", | |
| "BY", | |
| "T1.id", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "id", | |
| ",", | |
| "t1", | |
| ".", | |
| "name", | |
| ",", | |
| "t1", | |
| ".", | |
| "nationality", | |
| "from", | |
| "architect", | |
| "as", | |
| "t1", | |
| "join", | |
| "mill", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "id", | |
| "=", | |
| "t2", | |
| ".", | |
| "architect_id", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "id", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "¿Cuál es la identificación, el nombre y la nacionalidad del arquitecto que construyó la mayoría de los molinos?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ], | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "architecture", | |
| "query": "SELECT T1.id , T1.name , T1.gender FROM architect AS T1 JOIN bridge AS T2 ON T1.id = T2.architect_id GROUP BY T1.id HAVING count(*) = 2 UNION SELECT T1.id , T1.name , T1.gender FROM architect AS T1 JOIN mill AS T2 ON T1.id = T2.architect_id GROUP BY T1.id HAVING count(*) = 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.id", | |
| ",", | |
| "T1.name", | |
| ",", | |
| "T1.gender", | |
| "FROM", | |
| "architect", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "bridge", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.id", | |
| "=", | |
| "T2.architect_id", | |
| "GROUP", | |
| "BY", | |
| "T1.id", | |
| "HAVING", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "=", | |
| "2", | |
| "UNION", | |
| "SELECT", | |
| "T1.id", | |
| ",", | |
| "T1.name", | |
| ",", | |
| "T1.gender", | |
| "FROM", | |
| "architect", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "mill", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.id", | |
| "=", | |
| "T2.architect_id", | |
| "GROUP", | |
| "BY", | |
| "T1.id", | |
| "HAVING", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "=", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "id", | |
| ",", | |
| "t1", | |
| ".", | |
| "name", | |
| ",", | |
| "t1", | |
| ".", | |
| "gender", | |
| "from", | |
| "architect", | |
| "as", | |
| "t1", | |
| "join", | |
| "bridge", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "id", | |
| "=", | |
| "t2", | |
| ".", | |
| "architect_id", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "id", | |
| "having", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "=", | |
| "value", | |
| "union", | |
| "select", | |
| "t1", | |
| ".", | |
| "id", | |
| ",", | |
| "t1", | |
| ".", | |
| "name", | |
| ",", | |
| "t1", | |
| ".", | |
| "gender", | |
| "from", | |
| "architect", | |
| "as", | |
| "t1", | |
| "join", | |
| "mill", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "id", | |
| "=", | |
| "t2", | |
| ".", | |
| "architect_id", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "id", | |
| "having", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "=", | |
| "value" | |
| ], | |
| "question": "¿Cuáles son las identificaciones nombres y géneros de los arquitectos que construyeron dos puentes o un molino?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ], | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ] | |
| ], | |
| "having": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ], | |
| 2.0, | |
| null | |
| ] | |
| ], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ], | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ] | |
| ], | |
| "having": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ], | |
| 1.0, | |
| null | |
| ] | |
| ], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| }, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "architecture", | |
| "query": "SELECT LOCATION FROM bridge WHERE name = 'Kolob Arch' OR name = 'Rainbow Bridge'", | |
| "query_toks": [ | |
| "SELECT", | |
| "LOCATION", | |
| "FROM", | |
| "bridge", | |
| "WHERE", | |
| "name", | |
| "=", | |
| "'Kolob", | |
| "Arch", | |
| "'", | |
| "OR", | |
| "name", | |
| "=", | |
| "'Rainbow", | |
| "Bridge", | |
| "'" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "location", | |
| "from", | |
| "bridge", | |
| "where", | |
| "name", | |
| "=", | |
| "value", | |
| "or", | |
| "name", | |
| "=", | |
| "value" | |
| ], | |
| "question": "¿Cuál es la ubicación del puente llamado ''Kolob Arch o Rainbow Bridge?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 8, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Kolob Arch\"", | |
| null | |
| ], | |
| "or", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Rainbow Bridge\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "architecture", | |
| "query": "SELECT name FROM mill WHERE name LIKE '%Moulin%'", | |
| "query_toks": [ | |
| "SELECT", | |
| "name", | |
| "FROM", | |
| "mill", | |
| "WHERE", | |
| "name", | |
| "LIKE", | |
| "'", | |
| "%", | |
| "Moulin", | |
| "%", | |
| "'" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "name", | |
| "from", | |
| "mill", | |
| "where", | |
| "name", | |
| "like", | |
| "value" | |
| ], | |
| "question": "¿Cuál de los nombres de los molinos contiene la palabra francesa ''Moulin''?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 9, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"%Moulin%\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "architecture", | |
| "query": "SELECT DISTINCT T1.name FROM mill AS T1 JOIN architect AS t2 ON T1.architect_id = T2.id JOIN bridge AS T3 ON T3.architect_id = T2.id WHERE T3.length_meters > 80", | |
| "query_toks": [ | |
| "SELECT", | |
| "DISTINCT", | |
| "T1.name", | |
| "FROM", | |
| "mill", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "architect", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "T1.architect_id", | |
| "=", | |
| "T2.id", | |
| "JOIN", | |
| "bridge", | |
| "AS", | |
| "T3", | |
| "ON", | |
| "T3.architect_id", | |
| "=", | |
| "T2.id", | |
| "WHERE", | |
| "T3.length_meters", | |
| ">", | |
| "80" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "distinct", | |
| "t1", | |
| ".", | |
| "name", | |
| "from", | |
| "mill", | |
| "as", | |
| "t1", | |
| "join", | |
| "architect", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "architect_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "id", | |
| "join", | |
| "bridge", | |
| "as", | |
| "t3", | |
| "on", | |
| "t3", | |
| ".", | |
| "architect_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "id", | |
| "where", | |
| "t3", | |
| ".", | |
| "length_meters", | |
| ">", | |
| "value" | |
| ], | |
| "question": "¿Cuál es el nombre distintivo de los molinos construidos por los arquitectos que también han construido un puente de más de 80 metros?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ], | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| true, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ], | |
| 80.0, | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "architecture", | |
| "query": "SELECT TYPE , count(*) FROM mill GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "TYPE", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "mill", | |
| "GROUP", | |
| "BY", | |
| "TYPE", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "type", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "mill", | |
| "group", | |
| "by", | |
| "type", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "¿Cuál es el tipo de molino más común y cuántos hay?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "architecture", | |
| "query": "SELECT count(*) FROM architect WHERE id NOT IN ( SELECT architect_id FROM mill WHERE built_year < 1850 );", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "architect", | |
| "WHERE", | |
| "id", | |
| "NOT", | |
| "IN", | |
| "(", | |
| "SELECT", | |
| "architect_id", | |
| "FROM", | |
| "mill", | |
| "WHERE", | |
| "built_year", | |
| "<", | |
| "1850", | |
| ")", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "architect", | |
| "where", | |
| "id", | |
| "not", | |
| "in", | |
| "(", | |
| "select", | |
| "architect_id", | |
| "from", | |
| "mill", | |
| "where", | |
| "built_year", | |
| "<", | |
| "value", | |
| ")" | |
| ], | |
| "question": "¿Cuántos arquitectos no han construido un molino antes del año 1850?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| true, | |
| 8, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 4, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ], | |
| 1850.0, | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| }, | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "architecture", | |
| "query": "SELECT t1.name FROM bridge AS t1 JOIN architect AS t2 ON t1.architect_id = t2.id WHERE t2.nationality = 'American' ORDER BY t1.length_feet", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.name", | |
| "FROM", | |
| "bridge", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "architect", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.architect_id", | |
| "=", | |
| "t2.id", | |
| "WHERE", | |
| "t2.nationality", | |
| "=", | |
| "'American", | |
| "'", | |
| "ORDER", | |
| "BY", | |
| "t1.length_feet" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "name", | |
| "from", | |
| "bridge", | |
| "as", | |
| "t1", | |
| "join", | |
| "architect", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "architect_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "id", | |
| "where", | |
| "t2", | |
| ".", | |
| "nationality", | |
| "=", | |
| "value", | |
| "order", | |
| "by", | |
| "t1", | |
| ".", | |
| "length_feet" | |
| ], | |
| "question": "muestre el nombre de todos los puentes diseñados por el arquitecto ''american'' y ordene el resultado por la longitud de los pies del puente.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"American\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| } | |
| ] |