| [ | |
| { | |
| "db_id": "coffee_shop", | |
| "query": "SELECT count(*) FROM member WHERE Membership_card = 'Black'", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "member", | |
| "WHERE", | |
| "Membership_card", | |
| "=", | |
| "'Black", | |
| "'" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "member", | |
| "where", | |
| "membership_card", | |
| "=", | |
| "value" | |
| ], | |
| "question": "黒の会員カードを持っている会員は何人ですか?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 8, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Black\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "coffee_shop", | |
| "query": "SELECT count(*) , address FROM member GROUP BY address", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ",", | |
| "address", | |
| "FROM", | |
| "member", | |
| "GROUP", | |
| "BY", | |
| "address" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ",", | |
| "address", | |
| "from", | |
| "member", | |
| "group", | |
| "by", | |
| "address" | |
| ], | |
| "question": "各アドレスに住んでいるメンバーの数を見つけます。", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "coffee_shop", | |
| "query": "SELECT name FROM member WHERE address = 'Harford' OR address = 'Waterbury'", | |
| "query_toks": [ | |
| "SELECT", | |
| "name", | |
| "FROM", | |
| "member", | |
| "WHERE", | |
| "address", | |
| "=", | |
| "'Harford", | |
| "'", | |
| "OR", | |
| "address", | |
| "=", | |
| "'Waterbury", | |
| "'" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "name", | |
| "from", | |
| "member", | |
| "where", | |
| "address", | |
| "=", | |
| "value", | |
| "or", | |
| "address", | |
| "=", | |
| "value" | |
| ], | |
| "question": "住所が「Harford 」または「Waterbury」にあるメンバーの名前を教えてください。", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Harford\"", | |
| null | |
| ], | |
| "or", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Waterbury\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "coffee_shop", | |
| "query": "SELECT name , member_id FROM member WHERE Membership_card = 'Black' OR age < 30", | |
| "query_toks": [ | |
| "SELECT", | |
| "name", | |
| ",", | |
| "member_id", | |
| "FROM", | |
| "member", | |
| "WHERE", | |
| "Membership_card", | |
| "=", | |
| "'Black", | |
| "'", | |
| "OR", | |
| "age", | |
| "<", | |
| "30" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "name", | |
| ",", | |
| "member_id", | |
| "from", | |
| "member", | |
| "where", | |
| "membership_card", | |
| "=", | |
| "value", | |
| "or", | |
| "age", | |
| "<", | |
| "value" | |
| ], | |
| "question": "30歳未満または黒の会員カードを持っている会員のIDと名前を見つけてください。", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 8, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Black\"", | |
| null | |
| ], | |
| "or", | |
| [ | |
| false, | |
| 4, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ], | |
| 30.0, | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "coffee_shop", | |
| "query": "SELECT Time_of_purchase , age , address FROM member ORDER BY Time_of_purchase", | |
| "query_toks": [ | |
| "SELECT", | |
| "Time_of_purchase", | |
| ",", | |
| "age", | |
| ",", | |
| "address", | |
| "FROM", | |
| "member", | |
| "ORDER", | |
| "BY", | |
| "Time_of_purchase" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "time_of_purchase", | |
| ",", | |
| "age", | |
| ",", | |
| "address", | |
| "from", | |
| "member", | |
| "order", | |
| "by", | |
| "time_of_purchase" | |
| ], | |
| "question": "各会員の購入時間、年齢、住所を検索し、購入時間順に表示します。", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "coffee_shop", | |
| "query": "SELECT Membership_card FROM member GROUP BY Membership_card HAVING count(*) > 5", | |
| "query_toks": [ | |
| "SELECT", | |
| "Membership_card", | |
| "FROM", | |
| "member", | |
| "GROUP", | |
| "BY", | |
| "Membership_card", | |
| "HAVING", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ">", | |
| "5" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "membership_card", | |
| "from", | |
| "member", | |
| "group", | |
| "by", | |
| "membership_card", | |
| "having", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ">", | |
| "value" | |
| ], | |
| "question": "5人以上の会員がいる会員カードはどれですか?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 8, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 8, | |
| false | |
| ] | |
| ], | |
| "having": [ | |
| [ | |
| false, | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ], | |
| 5.0, | |
| null | |
| ] | |
| ], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "coffee_shop", | |
| "query": "SELECT address FROM member WHERE age < 30 INTERSECT SELECT address FROM member WHERE age > 40", | |
| "query_toks": [ | |
| "SELECT", | |
| "address", | |
| "FROM", | |
| "member", | |
| "WHERE", | |
| "age", | |
| "<", | |
| "30", | |
| "INTERSECT", | |
| "SELECT", | |
| "address", | |
| "FROM", | |
| "member", | |
| "WHERE", | |
| "age", | |
| ">", | |
| "40" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "address", | |
| "from", | |
| "member", | |
| "where", | |
| "age", | |
| "<", | |
| "value", | |
| "intersect", | |
| "select", | |
| "address", | |
| "from", | |
| "member", | |
| "where", | |
| "age", | |
| ">", | |
| "value" | |
| ], | |
| "question": "30歳未満のメンバーと40歳以上のメンバーの両方がいる住所はどれですか?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 4, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ], | |
| 30.0, | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ], | |
| 40.0, | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| }, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "coffee_shop", | |
| "query": "SELECT membership_card FROM member WHERE address = 'Hartford' INTERSECT SELECT membership_card FROM member WHERE address = 'Waterbury'", | |
| "query_toks": [ | |
| "SELECT", | |
| "membership_card", | |
| "FROM", | |
| "member", | |
| "WHERE", | |
| "address", | |
| "=", | |
| "'Hartford", | |
| "'", | |
| "INTERSECT", | |
| "SELECT", | |
| "membership_card", | |
| "FROM", | |
| "member", | |
| "WHERE", | |
| "address", | |
| "=", | |
| "'Waterbury", | |
| "'" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "membership_card", | |
| "from", | |
| "member", | |
| "where", | |
| "address", | |
| "=", | |
| "value", | |
| "intersect", | |
| "select", | |
| "membership_card", | |
| "from", | |
| "member", | |
| "where", | |
| "address", | |
| "=", | |
| "value" | |
| ], | |
| "question": "「Harford 」に住むメンバーと「Waterbury」に住むメンバーの両方が持っている会員カードは何ですか?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 8, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Hartford\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 8, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Waterbury\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| }, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "coffee_shop", | |
| "query": "SELECT count(*) FROM member WHERE address != 'Hartford'", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "member", | |
| "WHERE", | |
| "address", | |
| "!", | |
| "=", | |
| "'Hartford", | |
| "'" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "member", | |
| "where", | |
| "address", | |
| "!", | |
| "=", | |
| "value" | |
| ], | |
| "question": "「Harford 」に住んでいないメンバーは何人いますか?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 7, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Hartford\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "coffee_shop", | |
| "query": "SELECT address FROM member EXCEPT SELECT address FROM member WHERE Membership_card = 'Black'", | |
| "query_toks": [ | |
| "SELECT", | |
| "address", | |
| "FROM", | |
| "member", | |
| "EXCEPT", | |
| "SELECT", | |
| "address", | |
| "FROM", | |
| "member", | |
| "WHERE", | |
| "Membership_card", | |
| "=", | |
| "'Black", | |
| "'" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "address", | |
| "from", | |
| "member", | |
| "except", | |
| "select", | |
| "address", | |
| "from", | |
| "member", | |
| "where", | |
| "membership_card", | |
| "=", | |
| "value" | |
| ], | |
| "question": "黒の会員カードを持っていない住所", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 8, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Black\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| } | |
| }, | |
| { | |
| "db_id": "coffee_shop", | |
| "query": "SELECT address FROM shop ORDER BY open_year", | |
| "query_toks": [ | |
| "SELECT", | |
| "address", | |
| "FROM", | |
| "shop", | |
| "ORDER", | |
| "BY", | |
| "open_year" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "address", | |
| "from", | |
| "shop", | |
| "order", | |
| "by", | |
| "open_year" | |
| ], | |
| "question": "オープン年順にお店の住所を示す。", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "coffee_shop", | |
| "query": "SELECT avg(num_of_staff) , avg(score) FROM shop", | |
| "query_toks": [ | |
| "SELECT", | |
| "avg", | |
| "(", | |
| "num_of_staff", | |
| ")", | |
| ",", | |
| "avg", | |
| "(", | |
| "score", | |
| ")", | |
| "FROM", | |
| "shop" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "avg", | |
| "(", | |
| "num_of_staff", | |
| ")", | |
| ",", | |
| "avg", | |
| "(", | |
| "score", | |
| ")", | |
| "from", | |
| "shop" | |
| ], | |
| "question": "全店の平均スコアと平均スタッフ数は?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 5, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 5, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "coffee_shop", | |
| "query": "SELECT shop_id , address FROM shop WHERE score < (SELECT avg(score) FROM shop)", | |
| "query_toks": [ | |
| "SELECT", | |
| "shop_id", | |
| ",", | |
| "address", | |
| "FROM", | |
| "shop", | |
| "WHERE", | |
| "score", | |
| "<", | |
| "(", | |
| "SELECT", | |
| "avg", | |
| "(", | |
| "score", | |
| ")", | |
| "FROM", | |
| "shop", | |
| ")" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "shop_id", | |
| ",", | |
| "address", | |
| "from", | |
| "shop", | |
| "where", | |
| "score", | |
| "<", | |
| "(", | |
| "select", | |
| "avg", | |
| "(", | |
| "score", | |
| ")", | |
| "from", | |
| "shop", | |
| ")" | |
| ], | |
| "question": "スコアが平均スコアを下回っているショップのIDと住所。", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 4, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ], | |
| { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 5, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "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": "coffee_shop", | |
| "query": "SELECT address , num_of_staff FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM happy_hour)", | |
| "query_toks": [ | |
| "SELECT", | |
| "address", | |
| ",", | |
| "num_of_staff", | |
| "FROM", | |
| "shop", | |
| "WHERE", | |
| "shop_id", | |
| "NOT", | |
| "IN", | |
| "(", | |
| "SELECT", | |
| "shop_id", | |
| "FROM", | |
| "happy_hour", | |
| ")" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "address", | |
| ",", | |
| "num_of_staff", | |
| "from", | |
| "shop", | |
| "where", | |
| "shop_id", | |
| "not", | |
| "in", | |
| "(", | |
| "select", | |
| "shop_id", | |
| "from", | |
| "happy_hour", | |
| ")" | |
| ], | |
| "question": "ハッピーアワーがない店の住所とスタッフ番号を見つけます。", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| true, | |
| 8, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "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": "coffee_shop", | |
| "query": "SELECT t1.address , t1.shop_id FROM shop AS t1 JOIN happy_hour AS t2 ON t1.shop_id = t2.shop_id WHERE MONTH = 'May'", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.address", | |
| ",", | |
| "t1.shop_id", | |
| "FROM", | |
| "shop", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "happy_hour", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.shop_id", | |
| "=", | |
| "t2.shop_id", | |
| "WHERE", | |
| "MONTH", | |
| "=", | |
| "'May", | |
| "'" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "address", | |
| ",", | |
| "t1", | |
| ".", | |
| "shop_id", | |
| "from", | |
| "shop", | |
| "as", | |
| "t1", | |
| "join", | |
| "happy_hour", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "shop_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "shop_id", | |
| "where", | |
| "month", | |
| "=", | |
| "value" | |
| ], | |
| "question": "5月にハッピーアワーがある店のIDと住所は何ですか?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ], | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"May\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "coffee_shop", | |
| "query": "SELECT shop_id , count(*) FROM happy_hour GROUP BY shop_id ORDER BY count(*) DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "shop_id", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "happy_hour", | |
| "GROUP", | |
| "BY", | |
| "shop_id", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "shop_id", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "happy_hour", | |
| "group", | |
| "by", | |
| "shop_id", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "ハッピーアワーが最も多い店はどれですか?そのIDとハッピーアワーの数をリストします。", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "coffee_shop", | |
| "query": "SELECT MONTH FROM happy_hour GROUP BY MONTH ORDER BY count(*) DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "MONTH", | |
| "FROM", | |
| "happy_hour", | |
| "GROUP", | |
| "BY", | |
| "MONTH", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "month", | |
| "from", | |
| "happy_hour", | |
| "group", | |
| "by", | |
| "month", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "ハッピーアワーが最も多いのはどの月ですか?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| 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": "coffee_shop", | |
| "query": "SELECT MONTH FROM happy_hour GROUP BY MONTH HAVING count(*) > 2", | |
| "query_toks": [ | |
| "SELECT", | |
| "MONTH", | |
| "FROM", | |
| "happy_hour", | |
| "GROUP", | |
| "BY", | |
| "MONTH", | |
| "HAVING", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ">", | |
| "2" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "month", | |
| "from", | |
| "happy_hour", | |
| "group", | |
| "by", | |
| "month", | |
| "having", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ">", | |
| "value" | |
| ], | |
| "question": "ハッピーアワーが2時間以上あるのはどの月ですか?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ] | |
| ], | |
| "having": [ | |
| [ | |
| false, | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ], | |
| 2.0, | |
| null | |
| ] | |
| ], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| } | |
| ] |