[ { "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": "「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": "すべての「male」建築家の名前、国籍、IDをアルファベット順でリストします。", "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": "一番長い橋を造った建築家の名前は何ですか?", "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": "橋の平均の長さは何ですか?", "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": "「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": "工場を建設したことのある建築家の名前と国籍は何ですか?", "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": "「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": "「American」または「Canadian」の建築家によって建てられた工場のタイプは何ですか?", "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": "少なくとも3つの橋を建設した建築家のIDと名前は何ですか?", "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": "一番多くの工場を建設した建築家のID、名前、国籍は何ですか?", "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": "2つの橋または1つの工場を建設した建築家のID、名前、性別は何ですか?", "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": "「Kolob Arch」または「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": "フランス語の「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": "80メートルより長い橋も建設した建築家によって建てられた工場の名前は何ですか?", "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": "最も多い工場タイプは何ですか?また、いくつありますか?", "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": "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": "「american」建築家によって設計されたすべての橋の名前を橋のの長さで並べ替えます。", "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 } } ]