| [ | |
| { | |
| "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": "Wie viele Architektinnen sind \"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": "Listen Sie den Namen, die Nationalität und die ID aller \"male\" Architekten auf, die lexikografisch nach ihren Namen geordnet sind.", | |
| "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": "Was ist die maximale Länge in Metern für die Brücken und wie heißen die Architekten?", | |
| "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": "Was ist die durchschnittliche Länge in Fuß der Brücken?", | |
| "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": "Wie lauten die Namen und das Baujahr der Mühle von der Art \"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": "Was sind die unterschiedlichen Namen und Staatsangehörigkeiten der Architekten, die jemals eine Mühle gebaut haben?", | |
| "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": "Wie heißen die Mühlen, die sich nicht in \"Donceel\" befinden?", | |
| "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": "Was sind die verschiedenen Arten von Mühlen, die von \"American\" oder \"Canadian\" Architekten gebaut werden?", | |
| "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": "Wie lauten die IDs und Namen der Architekten, die mindestens drei Brücken gebaut haben?", | |
| "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": "Wie lautet die ID, der Name und die Staatsangehörigkeit des Architekten, der die meisten Mühlen gebaut hat?", | |
| "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": "Was sind die IDs, Namen und Geschlechter der Architekten, die zwei Brücken oder eine Mühle gebaut haben?", | |
| "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": "Wo befindet sich die Brücke mit dem Namen \"Kolob Arch\" oder \"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": "Welcher der Mühlennamen enthält das französische Wort \"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": "Wie heißen die Mühlen der Architekten, die auch eine Brücke gebaut haben, die länger als 80 Meter ist?", | |
| "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": "Was ist der häufigste Mühlen-Art und wie viele gibt es?", | |
| "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": "Wie viele Architekten haben vor 1850 keine Mühle gebaut?", | |
| "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": "Zeigen Sie den Namen aller Brücken an, die von \"american\" Archtekt entworfen wurden, und sortieren Sie das Ergebnis nach der Länge der Brückenfüße.", | |
| "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 | |
| } | |
| } | |
| ] |