| [ | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT count(*) FROM customers", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "customers" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "customers" | |
| ], | |
| "question": "Combien de clients y a-t-il?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT count(*) FROM customers", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "customers" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "customers" | |
| ], | |
| "question": "Comptez le nombre de clients.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT email_address , phone_number FROM customers ORDER BY email_address , phone_number", | |
| "query_toks": [ | |
| "SELECT", | |
| "email_address", | |
| ",", | |
| "phone_number", | |
| "FROM", | |
| "customers", | |
| "ORDER", | |
| "BY", | |
| "email_address", | |
| ",", | |
| "phone_number" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "email_address", | |
| ",", | |
| "phone_number", | |
| "from", | |
| "customers", | |
| "order", | |
| "by", | |
| "email_address", | |
| ",", | |
| "phone_number" | |
| ], | |
| "question": "Retrouvez les e-mails et numéros de téléphone de tous les clients, classés par adresse e-mail et numéro de téléphone.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT email_address , phone_number FROM customers ORDER BY email_address , phone_number", | |
| "query_toks": [ | |
| "SELECT", | |
| "email_address", | |
| ",", | |
| "phone_number", | |
| "FROM", | |
| "customers", | |
| "ORDER", | |
| "BY", | |
| "email_address", | |
| ",", | |
| "phone_number" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "email_address", | |
| ",", | |
| "phone_number", | |
| "from", | |
| "customers", | |
| "order", | |
| "by", | |
| "email_address", | |
| ",", | |
| "phone_number" | |
| ], | |
| "question": "Quels sont les e-mails et les numéros de téléphone de tous les clients, triés par adresse e-mail et numéro de téléphone?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT town_city FROM customers WHERE customer_type_code = \"Good Credit Rating\" GROUP BY town_city ORDER BY count(*) LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "town_city", | |
| "FROM", | |
| "customers", | |
| "WHERE", | |
| "customer_type_code", | |
| "=", | |
| "``", | |
| "Good", | |
| "Credit", | |
| "Rating", | |
| "''", | |
| "GROUP", | |
| "BY", | |
| "town_city", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "town_city", | |
| "from", | |
| "customers", | |
| "where", | |
| "customer_type_code", | |
| "=", | |
| "value", | |
| "group", | |
| "by", | |
| "town_city", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Quelle ville a le moins de clients dont le code de type est \"Good Credit Rating\"?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 8, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Good Credit Rating\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT town_city FROM customers WHERE customer_type_code = \"Good Credit Rating\" GROUP BY town_city ORDER BY count(*) LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "town_city", | |
| "FROM", | |
| "customers", | |
| "WHERE", | |
| "customer_type_code", | |
| "=", | |
| "``", | |
| "Good", | |
| "Credit", | |
| "Rating", | |
| "''", | |
| "GROUP", | |
| "BY", | |
| "town_city", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "town_city", | |
| "from", | |
| "customers", | |
| "where", | |
| "customer_type_code", | |
| "=", | |
| "value", | |
| "group", | |
| "by", | |
| "town_city", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Renvoyez la ville avec le code de type de client \"Good Credit Rating\" qui a eu le moins de clients.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 8, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Good Credit Rating\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT t1.product_name , count(*) FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_name", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.product_name", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "products", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "complaints", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.product_id", | |
| "=", | |
| "t2.product_id", | |
| "GROUP", | |
| "BY", | |
| "t1.product_name" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "product_name", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "products", | |
| "as", | |
| "t1", | |
| "join", | |
| "complaints", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "product_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "product_id", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "product_name" | |
| ], | |
| "question": "Énumérez le nom de tous les produits ainsi que le nombre de plaintes qu'ils ont reçues.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 24, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT t1.product_name , count(*) FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_name", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.product_name", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "products", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "complaints", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.product_id", | |
| "=", | |
| "t2.product_id", | |
| "GROUP", | |
| "BY", | |
| "t1.product_name" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "product_name", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "products", | |
| "as", | |
| "t1", | |
| "join", | |
| "complaints", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "product_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "product_id", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "product_name" | |
| ], | |
| "question": "Quels sont les différents noms de produits et combien de plaintes chacun a-t-il reçues?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 24, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT t1.email_address FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_id ORDER BY count(*) LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.email_address", | |
| "FROM", | |
| "customers", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "complaints", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.customer_id", | |
| "=", | |
| "t2.customer_id", | |
| "GROUP", | |
| "BY", | |
| "t1.customer_id", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "email_address", | |
| "from", | |
| "customers", | |
| "as", | |
| "t1", | |
| "join", | |
| "complaints", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "customer_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "customer_id", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "customer_id", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Trouvez les courriels des clients qui ont déposé une plainte du produit avec le plus de plaintes.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 25, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT t1.email_address FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_id ORDER BY count(*) LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.email_address", | |
| "FROM", | |
| "customers", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "complaints", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.customer_id", | |
| "=", | |
| "t2.customer_id", | |
| "GROUP", | |
| "BY", | |
| "t1.customer_id", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "email_address", | |
| "from", | |
| "customers", | |
| "as", | |
| "t1", | |
| "join", | |
| "complaints", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "customer_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "customer_id", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "customer_id", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Quels sont les e-mails des clients qui ont déposé des réclamations sur le produit qui a fait l'objet du plus grand nombre de réclamations?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 25, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT DISTINCT t1.product_name FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id JOIN customers AS t3 GROUP BY t3.customer_id ORDER BY count(*) LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "DISTINCT", | |
| "t1.product_name", | |
| "FROM", | |
| "products", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "complaints", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.product_id", | |
| "=", | |
| "t2.product_id", | |
| "JOIN", | |
| "customers", | |
| "AS", | |
| "t3", | |
| "GROUP", | |
| "BY", | |
| "t3.customer_id", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "distinct", | |
| "t1", | |
| ".", | |
| "product_name", | |
| "from", | |
| "products", | |
| "as", | |
| "t1", | |
| "join", | |
| "complaints", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "product_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "product_id", | |
| "join", | |
| "customers", | |
| "as", | |
| "t3", | |
| "group", | |
| "by", | |
| "t3", | |
| ".", | |
| "customer_id", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Quels produits ont fait l'objet de plaintes du client qui a déposé le moins de plaintes?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ], | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 24, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| true, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT DISTINCT t1.product_name FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id JOIN customers AS t3 GROUP BY t3.customer_id ORDER BY count(*) LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "DISTINCT", | |
| "t1.product_name", | |
| "FROM", | |
| "products", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "complaints", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.product_id", | |
| "=", | |
| "t2.product_id", | |
| "JOIN", | |
| "customers", | |
| "AS", | |
| "t3", | |
| "GROUP", | |
| "BY", | |
| "t3.customer_id", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "distinct", | |
| "t1", | |
| ".", | |
| "product_name", | |
| "from", | |
| "products", | |
| "as", | |
| "t1", | |
| "join", | |
| "complaints", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "product_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "product_id", | |
| "join", | |
| "customers", | |
| "as", | |
| "t3", | |
| "group", | |
| "by", | |
| "t3", | |
| ".", | |
| "customer_id", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Renvoyez les noms des produits qui ont fait l'objet de plaintes déposées par le client qui a déposé le moins de plaintes.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ], | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 24, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| true, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT t1.phone_number FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.date_complaint_raised DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.phone_number", | |
| "FROM", | |
| "customers", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "complaints", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.customer_id", | |
| "=", | |
| "t2.customer_id", | |
| "ORDER", | |
| "BY", | |
| "t2.date_complaint_raised", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "phone_number", | |
| "from", | |
| "customers", | |
| "as", | |
| "t1", | |
| "join", | |
| "complaints", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "customer_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "customer_id", | |
| "order", | |
| "by", | |
| "t2", | |
| ".", | |
| "date_complaint_raised", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Quel est le numéro de téléphone du client qui a déposé la plainte la plus récente?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 25, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 29, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT t1.phone_number FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.date_complaint_raised DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.phone_number", | |
| "FROM", | |
| "customers", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "complaints", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.customer_id", | |
| "=", | |
| "t2.customer_id", | |
| "ORDER", | |
| "BY", | |
| "t2.date_complaint_raised", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "phone_number", | |
| "from", | |
| "customers", | |
| "as", | |
| "t1", | |
| "join", | |
| "complaints", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "customer_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "customer_id", | |
| "order", | |
| "by", | |
| "t2", | |
| ".", | |
| "date_complaint_raised", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Renvoyez le numéro de téléphone du client qui a déposé la plainte la plus récente.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 25, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 29, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT email_address , phone_number FROM customers WHERE customer_id NOT IN (SELECT customer_id FROM complaints)", | |
| "query_toks": [ | |
| "SELECT", | |
| "email_address", | |
| ",", | |
| "phone_number", | |
| "FROM", | |
| "customers", | |
| "WHERE", | |
| "customer_id", | |
| "NOT", | |
| "IN", | |
| "(", | |
| "SELECT", | |
| "customer_id", | |
| "FROM", | |
| "complaints", | |
| ")" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "email_address", | |
| ",", | |
| "phone_number", | |
| "from", | |
| "customers", | |
| "where", | |
| "customer_id", | |
| "not", | |
| "in", | |
| "(", | |
| "select", | |
| "customer_id", | |
| "from", | |
| "complaints", | |
| ")" | |
| ], | |
| "question": "Trouvez l'adresse e-mail et le numéro de téléphone des clients qui n'ont jamais déposé de plainte auparavant.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| true, | |
| 8, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ], | |
| { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 25, | |
| 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": "customer_complaints", | |
| "query": "SELECT email_address , phone_number FROM customers WHERE customer_id NOT IN (SELECT customer_id FROM complaints)", | |
| "query_toks": [ | |
| "SELECT", | |
| "email_address", | |
| ",", | |
| "phone_number", | |
| "FROM", | |
| "customers", | |
| "WHERE", | |
| "customer_id", | |
| "NOT", | |
| "IN", | |
| "(", | |
| "SELECT", | |
| "customer_id", | |
| "FROM", | |
| "complaints", | |
| ")" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "email_address", | |
| ",", | |
| "phone_number", | |
| "from", | |
| "customers", | |
| "where", | |
| "customer_id", | |
| "not", | |
| "in", | |
| "(", | |
| "select", | |
| "customer_id", | |
| "from", | |
| "complaints", | |
| ")" | |
| ], | |
| "question": "Quels sont les e-mails et numéros de téléphone des clients qui n'ont jamais déposé de plainte?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| true, | |
| 8, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ], | |
| { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 25, | |
| 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": "customer_complaints", | |
| "query": "SELECT phone_number FROM customers UNION SELECT phone_number FROM staff", | |
| "query_toks": [ | |
| "SELECT", | |
| "phone_number", | |
| "FROM", | |
| "customers", | |
| "UNION", | |
| "SELECT", | |
| "phone_number", | |
| "FROM", | |
| "staff" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "phone_number", | |
| "from", | |
| "customers", | |
| "union", | |
| "select", | |
| "phone_number", | |
| "from", | |
| "staff" | |
| ], | |
| "question": "Trouvez le numéro de téléphone de tous les clients et employés.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| }, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT phone_number FROM customers UNION SELECT phone_number FROM staff", | |
| "query_toks": [ | |
| "SELECT", | |
| "phone_number", | |
| "FROM", | |
| "customers", | |
| "UNION", | |
| "SELECT", | |
| "phone_number", | |
| "FROM", | |
| "staff" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "phone_number", | |
| "from", | |
| "customers", | |
| "union", | |
| "select", | |
| "phone_number", | |
| "from", | |
| "staff" | |
| ], | |
| "question": "Quels sont les numéros de téléphone de tous les clients et de tous les membres du personnel?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| }, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT product_description FROM products WHERE product_name = \"Chocolate\"", | |
| "query_toks": [ | |
| "SELECT", | |
| "product_description", | |
| "FROM", | |
| "products", | |
| "WHERE", | |
| "product_name", | |
| "=", | |
| "``", | |
| "Chocolate", | |
| "''" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "product_description", | |
| "from", | |
| "products", | |
| "where", | |
| "product_name", | |
| "=", | |
| "value" | |
| ], | |
| "question": "Quelle est la description du produit nommé \"Chocolate\"?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 21, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Chocolate\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT product_description FROM products WHERE product_name = \"Chocolate\"", | |
| "query_toks": [ | |
| "SELECT", | |
| "product_description", | |
| "FROM", | |
| "products", | |
| "WHERE", | |
| "product_name", | |
| "=", | |
| "``", | |
| "Chocolate", | |
| "''" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "product_description", | |
| "from", | |
| "products", | |
| "where", | |
| "product_name", | |
| "=", | |
| "value" | |
| ], | |
| "question": "Renvoyez la description du produit appelé \"Chocolate\".", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 21, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Chocolate\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT product_name , product_category_code FROM products ORDER BY product_price DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "product_name", | |
| ",", | |
| "product_category_code", | |
| "FROM", | |
| "products", | |
| "ORDER", | |
| "BY", | |
| "product_price", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "product_name", | |
| ",", | |
| "product_category_code", | |
| "from", | |
| "products", | |
| "order", | |
| "by", | |
| "product_price", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Trouvez le nom et la catégorie du produit le plus cher.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT product_name , product_category_code FROM products ORDER BY product_price DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "product_name", | |
| ",", | |
| "product_category_code", | |
| "FROM", | |
| "products", | |
| "ORDER", | |
| "BY", | |
| "product_price", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "product_name", | |
| ",", | |
| "product_category_code", | |
| "from", | |
| "products", | |
| "order", | |
| "by", | |
| "product_price", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Quel est le nom et le code de catégorie du produit avec le prix le plus élevé?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT product_price FROM products WHERE product_id NOT IN (SELECT product_id FROM complaints)", | |
| "query_toks": [ | |
| "SELECT", | |
| "product_price", | |
| "FROM", | |
| "products", | |
| "WHERE", | |
| "product_id", | |
| "NOT", | |
| "IN", | |
| "(", | |
| "SELECT", | |
| "product_id", | |
| "FROM", | |
| "complaints", | |
| ")" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "product_price", | |
| "from", | |
| "products", | |
| "where", | |
| "product_id", | |
| "not", | |
| "in", | |
| "(", | |
| "select", | |
| "product_id", | |
| "from", | |
| "complaints", | |
| ")" | |
| ], | |
| "question": "Trouvez les prix des produits qui n'ont jamais reçu une seule réclamation.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| true, | |
| 8, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 24, | |
| 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": "customer_complaints", | |
| "query": "SELECT product_price FROM products WHERE product_id NOT IN (SELECT product_id FROM complaints)", | |
| "query_toks": [ | |
| "SELECT", | |
| "product_price", | |
| "FROM", | |
| "products", | |
| "WHERE", | |
| "product_id", | |
| "NOT", | |
| "IN", | |
| "(", | |
| "SELECT", | |
| "product_id", | |
| "FROM", | |
| "complaints", | |
| ")" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "product_price", | |
| "from", | |
| "products", | |
| "where", | |
| "product_id", | |
| "not", | |
| "in", | |
| "(", | |
| "select", | |
| "product_id", | |
| "from", | |
| "complaints", | |
| ")" | |
| ], | |
| "question": "Quels sont les prix des produits qui n'ont jamais fait l'objet d'une réclamation?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| true, | |
| 8, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 24, | |
| 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": "customer_complaints", | |
| "query": "SELECT avg(product_price) , product_category_code FROM products GROUP BY product_category_code", | |
| "query_toks": [ | |
| "SELECT", | |
| "avg", | |
| "(", | |
| "product_price", | |
| ")", | |
| ",", | |
| "product_category_code", | |
| "FROM", | |
| "products", | |
| "GROUP", | |
| "BY", | |
| "product_category_code" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "avg", | |
| "(", | |
| "product_price", | |
| ")", | |
| ",", | |
| "product_category_code", | |
| "from", | |
| "products", | |
| "group", | |
| "by", | |
| "product_category_code" | |
| ], | |
| "question": "Quel est le prix moyen des produits pour chaque catégorie?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 5, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT avg(product_price) , product_category_code FROM products GROUP BY product_category_code", | |
| "query_toks": [ | |
| "SELECT", | |
| "avg", | |
| "(", | |
| "product_price", | |
| ")", | |
| ",", | |
| "product_category_code", | |
| "FROM", | |
| "products", | |
| "GROUP", | |
| "BY", | |
| "product_category_code" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "avg", | |
| "(", | |
| "product_price", | |
| ")", | |
| ",", | |
| "product_category_code", | |
| "from", | |
| "products", | |
| "group", | |
| "by", | |
| "product_category_code" | |
| ], | |
| "question": "Renvoyez le prix moyen des produits qui ont chaque code de catégorie.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 5, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id JOIN products AS t3 ON t2.product_id = t3.product_id ORDER BY t3.product_price LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.last_name", | |
| "FROM", | |
| "staff", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "complaints", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.staff_id", | |
| "=", | |
| "t2.staff_id", | |
| "JOIN", | |
| "products", | |
| "AS", | |
| "t3", | |
| "ON", | |
| "t2.product_id", | |
| "=", | |
| "t3.product_id", | |
| "ORDER", | |
| "BY", | |
| "t3.product_price", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "last_name", | |
| "from", | |
| "staff", | |
| "as", | |
| "t1", | |
| "join", | |
| "complaints", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "staff_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "staff_id", | |
| "join", | |
| "products", | |
| "as", | |
| "t3", | |
| "on", | |
| "t2", | |
| ".", | |
| "product_id", | |
| "=", | |
| "t3", | |
| ".", | |
| "product_id", | |
| "order", | |
| "by", | |
| "t3", | |
| ".", | |
| "product_price", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Trouvez le nom de famille du membre du personnel qui a traité la réclamation du produit le moins cher.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ], | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 31, | |
| false | |
| ], | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 24, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id JOIN products AS t3 ON t2.product_id = t3.product_id ORDER BY t3.product_price LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.last_name", | |
| "FROM", | |
| "staff", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "complaints", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.staff_id", | |
| "=", | |
| "t2.staff_id", | |
| "JOIN", | |
| "products", | |
| "AS", | |
| "t3", | |
| "ON", | |
| "t2.product_id", | |
| "=", | |
| "t3.product_id", | |
| "ORDER", | |
| "BY", | |
| "t3.product_price", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "last_name", | |
| "from", | |
| "staff", | |
| "as", | |
| "t1", | |
| "join", | |
| "complaints", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "staff_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "staff_id", | |
| "join", | |
| "products", | |
| "as", | |
| "t3", | |
| "on", | |
| "t2", | |
| ".", | |
| "product_id", | |
| "=", | |
| "t3", | |
| ".", | |
| "product_id", | |
| "order", | |
| "by", | |
| "t3", | |
| ".", | |
| "product_price", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Quel est le nom de famille du membre du personnel en charge de la réclamation concernant le produit avec le prix le plus bas?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ], | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 31, | |
| false | |
| ], | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 24, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT complaint_status_code FROM complaints GROUP BY complaint_status_code HAVING count(*) > 3", | |
| "query_toks": [ | |
| "SELECT", | |
| "complaint_status_code", | |
| "FROM", | |
| "complaints", | |
| "GROUP", | |
| "BY", | |
| "complaint_status_code", | |
| "HAVING", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ">", | |
| "3" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "complaint_status_code", | |
| "from", | |
| "complaints", | |
| "group", | |
| "by", | |
| "complaint_status_code", | |
| "having", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ">", | |
| "value" | |
| ], | |
| "question": "Quel statut de plainte a plus de 3 enregistrements au dossier?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 27, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 27, | |
| false | |
| ] | |
| ], | |
| "having": [ | |
| [ | |
| false, | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ], | |
| 3.0, | |
| null | |
| ] | |
| ], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT complaint_status_code FROM complaints GROUP BY complaint_status_code HAVING count(*) > 3", | |
| "query_toks": [ | |
| "SELECT", | |
| "complaint_status_code", | |
| "FROM", | |
| "complaints", | |
| "GROUP", | |
| "BY", | |
| "complaint_status_code", | |
| "HAVING", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ">", | |
| "3" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "complaint_status_code", | |
| "from", | |
| "complaints", | |
| "group", | |
| "by", | |
| "complaint_status_code", | |
| "having", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ">", | |
| "value" | |
| ], | |
| "question": "Retournez les codes de statut de réclamation qui ont plus de 3 réclamations correspondantes?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 27, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 27, | |
| false | |
| ] | |
| ], | |
| "having": [ | |
| [ | |
| false, | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ], | |
| 3.0, | |
| null | |
| ] | |
| ], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT last_name FROM staff WHERE email_address LIKE \"%wrau%\"", | |
| "query_toks": [ | |
| "SELECT", | |
| "last_name", | |
| "FROM", | |
| "staff", | |
| "WHERE", | |
| "email_address", | |
| "LIKE", | |
| "``", | |
| "%", | |
| "wrau", | |
| "%", | |
| "''" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "last_name", | |
| "from", | |
| "staff", | |
| "where", | |
| "email_address", | |
| "like", | |
| "value" | |
| ], | |
| "question": "Trouvez le nom de famille du personnel dont l'adresse e-mail contient \"wrau\".", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 9, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"%wrau%\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT last_name FROM staff WHERE email_address LIKE \"%wrau%\"", | |
| "query_toks": [ | |
| "SELECT", | |
| "last_name", | |
| "FROM", | |
| "staff", | |
| "WHERE", | |
| "email_address", | |
| "LIKE", | |
| "``", | |
| "%", | |
| "wrau", | |
| "%", | |
| "''" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "last_name", | |
| "from", | |
| "staff", | |
| "where", | |
| "email_address", | |
| "like", | |
| "value" | |
| ], | |
| "question": "Quels sont les noms de famille du personnel dont l'adresse e-mail contient la sous-chaîne \"wrau\"?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 9, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"%wrau%\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT count(*) FROM customers GROUP BY customer_type_code ORDER BY count(*) DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "customers", | |
| "GROUP", | |
| "BY", | |
| "customer_type_code", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "customers", | |
| "group", | |
| "by", | |
| "customer_type_code", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Combien de clients y a-t-il dans le type de client avec le plus de clients?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 8, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT count(*) FROM customers GROUP BY customer_type_code ORDER BY count(*) DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "customers", | |
| "GROUP", | |
| "BY", | |
| "customer_type_code", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "customers", | |
| "group", | |
| "by", | |
| "customer_type_code", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Comptez le nombre de clients dont le type de client est le plus courant.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 8, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id ORDER BY t2.date_complaint_raised LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.last_name", | |
| "FROM", | |
| "staff", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "complaints", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.staff_id", | |
| "=", | |
| "t2.staff_id", | |
| "ORDER", | |
| "BY", | |
| "t2.date_complaint_raised", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "last_name", | |
| "from", | |
| "staff", | |
| "as", | |
| "t1", | |
| "join", | |
| "complaints", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "staff_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "staff_id", | |
| "order", | |
| "by", | |
| "t2", | |
| ".", | |
| "date_complaint_raised", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Quel est le nom de famille du personnel qui a traité la toute première plainte?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 31, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 29, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id ORDER BY t2.date_complaint_raised LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.last_name", | |
| "FROM", | |
| "staff", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "complaints", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.staff_id", | |
| "=", | |
| "t2.staff_id", | |
| "ORDER", | |
| "BY", | |
| "t2.date_complaint_raised", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "last_name", | |
| "from", | |
| "staff", | |
| "as", | |
| "t1", | |
| "join", | |
| "complaints", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "staff_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "staff_id", | |
| "order", | |
| "by", | |
| "t2", | |
| ".", | |
| "date_complaint_raised", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Renvoyez le nom de famille du membre du personnel qui a traité la plainte en mentionnant la date la plus ancienne.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 31, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 29, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT count(DISTINCT complaint_type_code) FROM complaints", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "DISTINCT", | |
| "complaint_type_code", | |
| ")", | |
| "FROM", | |
| "complaints" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "distinct", | |
| "complaint_type_code", | |
| ")", | |
| "from", | |
| "complaints" | |
| ], | |
| "question": "Combien de codes de type de plainte distincts existe-t-il dans la base de données?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 28, | |
| true | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT count(DISTINCT complaint_type_code) FROM complaints", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "DISTINCT", | |
| "complaint_type_code", | |
| ")", | |
| "FROM", | |
| "complaints" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "distinct", | |
| "complaint_type_code", | |
| ")", | |
| "from", | |
| "complaints" | |
| ], | |
| "question": "Comptez le nombre de codes de type de réclamation différents.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 28, | |
| true | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT address_line_1 , address_line_2 FROM customers WHERE email_address = \"vbogisich@example.org\"", | |
| "query_toks": [ | |
| "SELECT", | |
| "address_line_1", | |
| ",", | |
| "address_line_2", | |
| "FROM", | |
| "customers", | |
| "WHERE", | |
| "email_address", | |
| "=", | |
| "``", | |
| "vbogisich", | |
| "@", | |
| "example.org", | |
| "''" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "address_line_1", | |
| ",", | |
| "address_line_2", | |
| "from", | |
| "customers", | |
| "where", | |
| "email_address", | |
| "=", | |
| "value" | |
| ], | |
| "question": "Trouvez l'adresse ligne 1 et 2 du client avec l'email \"vbogisich@example.org\".", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"vbogisich@example.org\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT address_line_1 , address_line_2 FROM customers WHERE email_address = \"vbogisich@example.org\"", | |
| "query_toks": [ | |
| "SELECT", | |
| "address_line_1", | |
| ",", | |
| "address_line_2", | |
| "FROM", | |
| "customers", | |
| "WHERE", | |
| "email_address", | |
| "=", | |
| "``", | |
| "vbogisich", | |
| "@", | |
| "example.org", | |
| "''" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "address_line_1", | |
| ",", | |
| "address_line_2", | |
| "from", | |
| "customers", | |
| "where", | |
| "email_address", | |
| "=", | |
| "value" | |
| ], | |
| "question": "Quelles sont les lignes 1 et 2 de l'adresse du client avec l'email \"vbogisich@example.org\"?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"vbogisich@example.org\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT complaint_status_code , count(*) FROM complaints WHERE complaint_type_code = \"Product Failure\" GROUP BY complaint_status_code", | |
| "query_toks": [ | |
| "SELECT", | |
| "complaint_status_code", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "complaints", | |
| "WHERE", | |
| "complaint_type_code", | |
| "=", | |
| "``", | |
| "Product", | |
| "Failure", | |
| "''", | |
| "GROUP", | |
| "BY", | |
| "complaint_status_code" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "complaint_status_code", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "complaints", | |
| "where", | |
| "complaint_type_code", | |
| "=", | |
| "value", | |
| "group", | |
| "by", | |
| "complaint_status_code" | |
| ], | |
| "question": "Trouvez le nombre de réclamations avec le type de \"Product Failure\" pour chaque statut de réclamation.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 27, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 28, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Product Failure\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 27, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT complaint_status_code , count(*) FROM complaints WHERE complaint_type_code = \"Product Failure\" GROUP BY complaint_status_code", | |
| "query_toks": [ | |
| "SELECT", | |
| "complaint_status_code", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "complaints", | |
| "WHERE", | |
| "complaint_type_code", | |
| "=", | |
| "``", | |
| "Product", | |
| "Failure", | |
| "''", | |
| "GROUP", | |
| "BY", | |
| "complaint_status_code" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "complaint_status_code", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "complaints", | |
| "where", | |
| "complaint_type_code", | |
| "=", | |
| "value", | |
| "group", | |
| "by", | |
| "complaint_status_code" | |
| ], | |
| "question": "Parmi les plaintes avec le code de type \"Product Failure\", combien avait chaque code de statut différent?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 27, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 28, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Product Failure\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 27, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT t1.first_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id GROUP BY t2.staff_id ORDER BY count(*) LIMIT 5", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.first_name", | |
| "FROM", | |
| "staff", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "complaints", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.staff_id", | |
| "=", | |
| "t2.staff_id", | |
| "GROUP", | |
| "BY", | |
| "t2.staff_id", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "LIMIT", | |
| "5" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "first_name", | |
| "from", | |
| "staff", | |
| "as", | |
| "t1", | |
| "join", | |
| "complaints", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "staff_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "staff_id", | |
| "group", | |
| "by", | |
| "t2", | |
| ".", | |
| "staff_id", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Quels sont les prénoms des 5 meilleurs collaborateurs ayant traité le plus grand nombre de plaintes?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 31, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 31, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 5, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT t1.first_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id GROUP BY t2.staff_id ORDER BY count(*) LIMIT 5", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.first_name", | |
| "FROM", | |
| "staff", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "complaints", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.staff_id", | |
| "=", | |
| "t2.staff_id", | |
| "GROUP", | |
| "BY", | |
| "t2.staff_id", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "LIMIT", | |
| "5" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "first_name", | |
| "from", | |
| "staff", | |
| "as", | |
| "t1", | |
| "join", | |
| "complaints", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "staff_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "staff_id", | |
| "group", | |
| "by", | |
| "t2", | |
| ".", | |
| "staff_id", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Renvoyez les prénoms des 5 membres du personnel qui ont traité le plus de plaintes.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 31, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 31, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 5, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT state FROM customers GROUP BY state ORDER BY count(*) LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "state", | |
| "FROM", | |
| "customers", | |
| "GROUP", | |
| "BY", | |
| "state", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "state", | |
| "from", | |
| "customers", | |
| "group", | |
| "by", | |
| "state", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Quel État a le plus de clients?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT state FROM customers GROUP BY state ORDER BY count(*) LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "state", | |
| "FROM", | |
| "customers", | |
| "GROUP", | |
| "BY", | |
| "state", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "state", | |
| "from", | |
| "customers", | |
| "group", | |
| "by", | |
| "state", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Donnez l'État qui a le plus de clients.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| } | |
| ] |