[ { "db_id": "allergy_1", "query": "SELECT count(DISTINCT allergy) FROM Allergy_type", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "allergy", ")", "FROM", "Allergy_type" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "allergy", ")", "from", "allergy_type" ], "question": "¿Cuántas alergias hay?", "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 1, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT count(DISTINCT allergy) FROM Allergy_type", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "allergy", ")", "FROM", "Allergy_type" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "allergy", ")", "from", "allergy_type" ], "question": "¿Cuántos programas de alergia hay?", "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 1, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT count(DISTINCT allergytype) FROM Allergy_type", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "allergytype", ")", "FROM", "Allergy_type" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "allergytype", ")", "from", "allergy_type" ], "question": "¿Cuántos tipos diferentes de alergias existen?", "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 2, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT count(DISTINCT allergytype) FROM Allergy_type", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "allergytype", ")", "FROM", "Allergy_type" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "allergytype", ")", "from", "allergy_type" ], "question": "¿Cuántas alergias distintas existen?", "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 2, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT DISTINCT allergytype FROM Allergy_type", "query_toks": [ "SELECT", "DISTINCT", "allergytype", "FROM", "Allergy_type" ], "query_toks_no_value": [ "select", "distinct", "allergytype", "from", "allergy_type" ], "question": "Muestre todos los tipos de alergias.", "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT DISTINCT allergytype FROM Allergy_type", "query_toks": [ "SELECT", "DISTINCT", "allergytype", "FROM", "Allergy_type" ], "query_toks_no_value": [ "select", "distinct", "allergytype", "from", "allergy_type" ], "question": "¿Cuáles son los diferentes tipos de alergias?", "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT allergy , allergytype FROM Allergy_type", "query_toks": [ "SELECT", "allergy", ",", "allergytype", "FROM", "Allergy_type" ], "query_toks_no_value": [ "select", "allergy", ",", "allergytype", "from", "allergy_type" ], "question": "Muestre todas las alergias y sus tipos.", "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT allergy , allergytype FROM Allergy_type", "query_toks": [ "SELECT", "allergy", ",", "allergytype", "FROM", "Allergy_type" ], "query_toks_no_value": [ "select", "allergy", ",", "allergytype", "from", "allergy_type" ], "question": "¿Cuáles son las alergias y sus tipos?", "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT DISTINCT allergy FROM Allergy_type WHERE allergytype = \"food\"", "query_toks": [ "SELECT", "DISTINCT", "allergy", "FROM", "Allergy_type", "WHERE", "allergytype", "=", "``", "food", "''" ], "query_toks_no_value": [ "select", "distinct", "allergy", "from", "allergy_type", "where", "allergytype", "=", "value" ], "question": "Muestre todas las alergias con el tipo de \"food\".", "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"food\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT DISTINCT allergy FROM Allergy_type WHERE allergytype = \"food\"", "query_toks": [ "SELECT", "DISTINCT", "allergy", "FROM", "Allergy_type", "WHERE", "allergytype", "=", "``", "food", "''" ], "query_toks_no_value": [ "select", "distinct", "allergy", "from", "allergy_type", "where", "allergytype", "=", "value" ], "question": "¿Cuáles son las diferentes alergias ''food''", "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 1, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"food\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT allergytype FROM Allergy_type WHERE allergy = \"Cat\"", "query_toks": [ "SELECT", "allergytype", "FROM", "Allergy_type", "WHERE", "allergy", "=", "``", "Cat", "''" ], "query_toks_no_value": [ "select", "allergytype", "from", "allergy_type", "where", "allergy", "=", "value" ], "question": "¿Cuál es el tipo de alergia al ''Cat''?", "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 1, false ], null ], "\"Cat\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT allergytype FROM Allergy_type WHERE allergy = \"Cat\"", "query_toks": [ "SELECT", "allergytype", "FROM", "Allergy_type", "WHERE", "allergy", "=", "``", "Cat", "''" ], "query_toks_no_value": [ "select", "allergytype", "from", "allergy_type", "where", "allergy", "=", "value" ], "question": "¿Qué es el tipo de alergia a la alergia al ''Cat''?", "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 1, false ], null ], "\"Cat\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT count(*) FROM Allergy_type WHERE allergytype = \"animal\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Allergy_type", "WHERE", "allergytype", "=", "``", "animal", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "allergy_type", "where", "allergytype", "=", "value" ], "question": "¿Cuántas alergias tiene tipo ''animal''?", "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"animal\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT count(*) FROM Allergy_type WHERE allergytype = \"animal\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Allergy_type", "WHERE", "allergytype", "=", "``", "animal", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "allergy_type", "where", "allergytype", "=", "value" ], "question": "¿Cuántas alergias de tipo ''animal'' existen?", "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"animal\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT allergytype , count(*) FROM Allergy_type GROUP BY allergytype", "query_toks": [ "SELECT", "allergytype", ",", "count", "(", "*", ")", "FROM", "Allergy_type", "GROUP", "BY", "allergytype" ], "query_toks_no_value": [ "select", "allergytype", ",", "count", "(", "*", ")", "from", "allergy_type", "group", "by", "allergytype" ], "question": "Muestre todos los tipos de alergias y el número de alergias en cada tipo.", "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT allergytype , count(*) FROM Allergy_type GROUP BY allergytype", "query_toks": [ "SELECT", "allergytype", ",", "count", "(", "*", ")", "FROM", "Allergy_type", "GROUP", "BY", "allergytype" ], "query_toks_no_value": [ "select", "allergytype", ",", "count", "(", "*", ")", "from", "allergy_type", "group", "by", "allergytype" ], "question": "¿Cuáles son los tipos de alergias y cuántas alergias corresponden a cada uno?", "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "allergytype", "FROM", "Allergy_type", "GROUP", "BY", "allergytype", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "allergytype", "from", "allergy_type", "group", "by", "allergytype", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "¿Qué tipo de alergia tiene la mayor cantidad de alergias?", "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "allergytype", "FROM", "Allergy_type", "GROUP", "BY", "allergytype", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "allergytype", "from", "allergy_type", "group", "by", "allergytype", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "¿Qué tipo de alergia es más común?", "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY count(*) ASC LIMIT 1", "query_toks": [ "SELECT", "allergytype", "FROM", "Allergy_type", "GROUP", "BY", "allergytype", "ORDER", "BY", "count", "(", "*", ")", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "allergytype", "from", "allergy_type", "group", "by", "allergytype", "order", "by", "count", "(", "*", ")", "asc", "limit", "value" ], "question": "¿Qué tipo de alergia tiene la menor cantidad de alergias?", "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY count(*) ASC LIMIT 1", "query_toks": [ "SELECT", "allergytype", "FROM", "Allergy_type", "GROUP", "BY", "allergytype", "ORDER", "BY", "count", "(", "*", ")", "ASC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "allergytype", "from", "allergy_type", "group", "by", "allergytype", "order", "by", "count", "(", "*", ")", "asc", "limit", "value" ], "question": "¿Qué tipo de alergia es el menos común?", "sql": { "from": { "table_units": [ [ "table_unit", 0 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [ "asc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT count(*) FROM Student", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Student" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "student" ], "question": "¿Cuántos estudiantes hay ahí?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT count(*) FROM Student", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Student" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "student" ], "question": "¿Cuál es el número total de estudiantes?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT Fname , Lname FROM Student", "query_toks": [ "SELECT", "Fname", ",", "Lname", "FROM", "Student" ], "query_toks_no_value": [ "select", "fname", ",", "lname", "from", "student" ], "question": "Muestre el nombre y apellido de todos los estudiantes.", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT Fname , Lname FROM Student", "query_toks": [ "SELECT", "Fname", ",", "Lname", "FROM", "Student" ], "query_toks_no_value": [ "select", "fname", ",", "lname", "from", "student" ], "question": "¿Cuáles son los nombres completos de todos los estudiantes?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT count(DISTINCT advisor) FROM Student", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "advisor", ")", "FROM", "Student" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "advisor", ")", "from", "student" ], "question": "¿Cuántos profesores diferentes se enumeran?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 11, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT count(DISTINCT advisor) FROM Student", "query_toks": [ "SELECT", "count", "(", "DISTINCT", "advisor", ")", "FROM", "Student" ], "query_toks_no_value": [ "select", "count", "(", "distinct", "advisor", ")", "from", "student" ], "question": "¿Cuántos profesores hay?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 11, true ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT DISTINCT Major FROM Student", "query_toks": [ "SELECT", "DISTINCT", "Major", "FROM", "Student" ], "query_toks_no_value": [ "select", "distinct", "major", "from", "student" ], "question": "Muestre todas las especialidades.", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT DISTINCT Major FROM Student", "query_toks": [ "SELECT", "DISTINCT", "Major", "FROM", "Student" ], "query_toks_no_value": [ "select", "distinct", "major", "from", "student" ], "question": "¿Cuáles son las diferentes especialidades?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT DISTINCT city_code FROM Student", "query_toks": [ "SELECT", "DISTINCT", "city_code", "FROM", "Student" ], "query_toks_no_value": [ "select", "distinct", "city_code", "from", "student" ], "question": "Muestre todas las ciudades donde viven los estudiantes.", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT DISTINCT city_code FROM Student", "query_toks": [ "SELECT", "DISTINCT", "city_code", "FROM", "Student" ], "query_toks_no_value": [ "select", "distinct", "city_code", "from", "student" ], "question": "¿En qué ciudades viven los estudiantes?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ true, [ [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT Fname , Lname , Age FROM Student WHERE Sex = 'F'", "query_toks": [ "SELECT", "Fname", ",", "Lname", ",", "Age", "FROM", "Student", "WHERE", "Sex", "=", "'F", "'" ], "query_toks_no_value": [ "select", "fname", ",", "lname", ",", "age", "from", "student", "where", "sex", "=", "value" ], "question": "Muestre el nombre, apellido y edad de todas las alumnas. Su sexo es ''F''.", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"F\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT Fname , Lname , Age FROM Student WHERE Sex = 'F'", "query_toks": [ "SELECT", "Fname", ",", "Lname", ",", "Age", "FROM", "Student", "WHERE", "Sex", "=", "'F", "'" ], "query_toks_no_value": [ "select", "fname", ",", "lname", ",", "age", "from", "student", "where", "sex", "=", "value" ], "question": "¿Cuáles son los nombres completos y las edades de todas las estudiantes cuyo sexo es ''F''?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"F\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT StuID FROM Student WHERE Sex = 'M'", "query_toks": [ "SELECT", "StuID", "FROM", "Student", "WHERE", "Sex", "=", "'M", "'" ], "query_toks_no_value": [ "select", "stuid", "from", "student", "where", "sex", "=", "value" ], "question": "Muestre las identificaciones de estudiantes de todos los estudiantes varones.", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"M\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT StuID FROM Student WHERE Sex = 'M'", "query_toks": [ "SELECT", "StuID", "FROM", "Student", "WHERE", "Sex", "=", "'M", "'" ], "query_toks_no_value": [ "select", "stuid", "from", "student", "where", "sex", "=", "value" ], "question": "¿Cuáles son las identificaciones de estudiante para todos los estudiantes varones?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"M\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT count(*) FROM Student WHERE age = 18", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Student", "WHERE", "age", "=", "18" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "student", "where", "age", "=", "value" ], "question": "¿Cuántos estudiantes tienen 18 años?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 8, false ], null ], 18.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT count(*) FROM Student WHERE age = 18", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Student", "WHERE", "age", "=", "18" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "student", "where", "age", "=", "value" ], "question": "¿Cuántos estudiantes tienen 18 años?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 8, false ], null ], 18.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT StuID FROM Student WHERE age > 20", "query_toks": [ "SELECT", "StuID", "FROM", "Student", "WHERE", "age", ">", "20" ], "query_toks_no_value": [ "select", "stuid", "from", "student", "where", "age", ">", "value" ], "question": "Muestre todos las identificaciones de estudiantes mayores de 20 años.", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 8, false ], null ], 20.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT StuID FROM Student WHERE age > 20", "query_toks": [ "SELECT", "StuID", "FROM", "Student", "WHERE", "age", ">", "20" ], "query_toks_no_value": [ "select", "stuid", "from", "student", "where", "age", ">", "value" ], "question": "¿Cuáles son las identificaciones de estudiante para estudiantes mayores de 20 años?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 8, false ], null ], 20.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT city_code FROM Student WHERE LName = \"Kim\"", "query_toks": [ "SELECT", "city_code", "FROM", "Student", "WHERE", "LName", "=", "``", "Kim", "''" ], "query_toks_no_value": [ "select", "city_code", "from", "student", "where", "lname", "=", "value" ], "question": "¿En qué ciudad vive el estudiante cuyo apellido es \"Kim\"?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 6, false ], null ], "\"Kim\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT city_code FROM Student WHERE LName = \"Kim\"", "query_toks": [ "SELECT", "city_code", "FROM", "Student", "WHERE", "LName", "=", "``", "Kim", "''" ], "query_toks_no_value": [ "select", "city_code", "from", "student", "where", "lname", "=", "value" ], "question": "Indique la ciudad en la que vive el estudiante cuyo apellido es ''Kim''.", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 6, false ], null ], "\"Kim\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT Advisor FROM Student WHERE StuID = 1004", "query_toks": [ "SELECT", "Advisor", "FROM", "Student", "WHERE", "StuID", "=", "1004" ], "query_toks_no_value": [ "select", "advisor", "from", "student", "where", "stuid", "=", "value" ], "question": "¿Quién es el profesor del estudiante con DNI 1004?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], 1004.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT Advisor FROM Student WHERE StuID = 1004", "query_toks": [ "SELECT", "Advisor", "FROM", "Student", "WHERE", "StuID", "=", "1004" ], "query_toks_no_value": [ "select", "advisor", "from", "student", "where", "stuid", "=", "value" ], "question": "¿Quién aconseja al estudiante 1004?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 5, false ], null ], 1004.0, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT count(*) FROM Student WHERE city_code = \"HKG\" OR city_code = \"CHI\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Student", "WHERE", "city_code", "=", "``", "HKG", "''", "OR", "city_code", "=", "``", "CHI", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "student", "where", "city_code", "=", "value", "or", "city_code", "=", "value" ], "question": "¿Cuántos estudiantes viven en ''HKG'' o ''CHI''?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"HKG\"", null ], "or", [ false, 2, [ 0, [ 0, 12, false ], null ], "\"CHI\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT count(*) FROM Student WHERE city_code = \"HKG\" OR city_code = \"CHI\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Student", "WHERE", "city_code", "=", "``", "HKG", "''", "OR", "city_code", "=", "``", "CHI", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "student", "where", "city_code", "=", "value", "or", "city_code", "=", "value" ], "question": "Indique el número de estudiantes que viven en ''HKG'' o ''CHI''.", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 12, false ], null ], "\"HKG\"", null ], "or", [ false, 2, [ 0, [ 0, 12, false ], null ], "\"CHI\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT min(age) , avg(age) , max(age) FROM Student", "query_toks": [ "SELECT", "min", "(", "age", ")", ",", "avg", "(", "age", ")", ",", "max", "(", "age", ")", "FROM", "Student" ], "query_toks_no_value": [ "select", "min", "(", "age", ")", ",", "avg", "(", "age", ")", ",", "max", "(", "age", ")", "from", "student" ], "question": "Muestre la edad mínima, media y máxima de todos los estudiantes.", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 8, false ], null ] ], [ 5, [ 0, [ 0, 8, false ], null ] ], [ 1, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT min(age) , avg(age) , max(age) FROM Student", "query_toks": [ "SELECT", "min", "(", "age", ")", ",", "avg", "(", "age", ")", ",", "max", "(", "age", ")", "FROM", "Student" ], "query_toks_no_value": [ "select", "min", "(", "age", ")", ",", "avg", "(", "age", ")", ",", "max", "(", "age", ")", "from", "student" ], "question": "¿Cuál es la edad mínima, media y máxima de todos los estudiantes?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 8, false ], null ] ], [ 5, [ 0, [ 0, 8, false ], null ] ], [ 1, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT LName FROM Student WHERE age = (SELECT min(age) FROM Student)", "query_toks": [ "SELECT", "LName", "FROM", "Student", "WHERE", "age", "=", "(", "SELECT", "min", "(", "age", ")", "FROM", "Student", ")" ], "query_toks_no_value": [ "select", "lname", "from", "student", "where", "age", "=", "(", "select", "min", "(", "age", ")", "from", "student", ")" ], "question": "¿Cuál es el apellido del estudiante más joven?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 8, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 8, 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": "allergy_1", "query": "SELECT LName FROM Student WHERE age = (SELECT min(age) FROM Student)", "query_toks": [ "SELECT", "LName", "FROM", "Student", "WHERE", "age", "=", "(", "SELECT", "min", "(", "age", ")", "FROM", "Student", ")" ], "query_toks_no_value": [ "select", "lname", "from", "student", "where", "age", "=", "(", "select", "min", "(", "age", ")", "from", "student", ")" ], "question": "Proporcione el apellido del estudiante más joven.", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 8, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 2, [ 0, [ 0, 8, 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": "allergy_1", "query": "SELECT StuID FROM Student WHERE age = (SELECT max(age) FROM Student)", "query_toks": [ "SELECT", "StuID", "FROM", "Student", "WHERE", "age", "=", "(", "SELECT", "max", "(", "age", ")", "FROM", "Student", ")" ], "query_toks_no_value": [ "select", "stuid", "from", "student", "where", "age", "=", "(", "select", "max", "(", "age", ")", "from", "student", ")" ], "question": "Muestre la identificación de estudiante del estudiante de mayor edad.", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 8, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 8, 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": "allergy_1", "query": "SELECT StuID FROM Student WHERE age = (SELECT max(age) FROM Student)", "query_toks": [ "SELECT", "StuID", "FROM", "Student", "WHERE", "age", "=", "(", "SELECT", "max", "(", "age", ")", "FROM", "Student", ")" ], "query_toks_no_value": [ "select", "stuid", "from", "student", "where", "age", "=", "(", "select", "max", "(", "age", ")", "from", "student", ")" ], "question": "¿Qué identificación de estudiante corresponde al estudiante de mayor edad?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 8, false ], null ], { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 1, [ 0, [ 0, 8, 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": "allergy_1", "query": "SELECT major , count(*) FROM Student GROUP BY major", "query_toks": [ "SELECT", "major", ",", "count", "(", "*", ")", "FROM", "Student", "GROUP", "BY", "major" ], "query_toks_no_value": [ "select", "major", ",", "count", "(", "*", ")", "from", "student", "group", "by", "major" ], "question": "Muestre todas las especialidades y el número correspondiente de estudiantes.", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT major , count(*) FROM Student GROUP BY major", "query_toks": [ "SELECT", "major", ",", "count", "(", "*", ")", "FROM", "Student", "GROUP", "BY", "major" ], "query_toks_no_value": [ "select", "major", ",", "count", "(", "*", ")", "from", "student", "group", "by", "major" ], "question": "¿Cuántos estudiantes hay para cada especialidad?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT major FROM Student GROUP BY major ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "major", "FROM", "Student", "GROUP", "BY", "major", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "major", "from", "student", "group", "by", "major", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "¿Qué especialidad tiene la mayor cantidad de estudiantes?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT major FROM Student GROUP BY major ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "major", "FROM", "Student", "GROUP", "BY", "major", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "major", "from", "student", "group", "by", "major", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "¿Cuál es la especialidad más grande?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 10, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT age , count(*) FROM Student GROUP BY age", "query_toks": [ "SELECT", "age", ",", "count", "(", "*", ")", "FROM", "Student", "GROUP", "BY", "age" ], "query_toks_no_value": [ "select", "age", ",", "count", "(", "*", ")", "from", "student", "group", "by", "age" ], "question": "Muestre todas las edades y el número correspondiente de estudiantes.", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 8, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT age , count(*) FROM Student GROUP BY age", "query_toks": [ "SELECT", "age", ",", "count", "(", "*", ")", "FROM", "Student", "GROUP", "BY", "age" ], "query_toks_no_value": [ "select", "age", ",", "count", "(", "*", ")", "from", "student", "group", "by", "age" ], "question": "¿Qué edad tiene cada estudiante y cuántos estudiantes tiene cada edad?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 8, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 8, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT avg(age) , sex FROM Student GROUP BY sex", "query_toks": [ "SELECT", "avg", "(", "age", ")", ",", "sex", "FROM", "Student", "GROUP", "BY", "sex" ], "query_toks_no_value": [ "select", "avg", "(", "age", ")", ",", "sex", "from", "student", "group", "by", "sex" ], "question": "Muestre la edad media de estudiantes hombres y mujeres.", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 8, false ], null ] ], [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 9, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT avg(age) , sex FROM Student GROUP BY sex", "query_toks": [ "SELECT", "avg", "(", "age", ")", ",", "sex", "FROM", "Student", "GROUP", "BY", "sex" ], "query_toks_no_value": [ "select", "avg", "(", "age", ")", ",", "sex", "from", "student", "group", "by", "sex" ], "question": "¿Cuáles son las edades medias de los alumnos y alumnas?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 8, false ], null ] ], [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 9, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT city_code , count(*) FROM Student GROUP BY city_code", "query_toks": [ "SELECT", "city_code", ",", "count", "(", "*", ")", "FROM", "Student", "GROUP", "BY", "city_code" ], "query_toks_no_value": [ "select", "city_code", ",", "count", "(", "*", ")", "from", "student", "group", "by", "city_code" ], "question": "Muestre todas las ciudades y el número correspondiente de estudiantes.", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 12, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 12, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT city_code , count(*) FROM Student GROUP BY city_code", "query_toks": [ "SELECT", "city_code", ",", "count", "(", "*", ")", "FROM", "Student", "GROUP", "BY", "city_code" ], "query_toks_no_value": [ "select", "city_code", ",", "count", "(", "*", ")", "from", "student", "group", "by", "city_code" ], "question": "¿Cuántos estudiantes viven en cada ciudad?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 12, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 12, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT advisor , count(*) FROM Student GROUP BY advisor", "query_toks": [ "SELECT", "advisor", ",", "count", "(", "*", ")", "FROM", "Student", "GROUP", "BY", "advisor" ], "query_toks_no_value": [ "select", "advisor", ",", "count", "(", "*", ")", "from", "student", "group", "by", "advisor" ], "question": "Muestre todos lo profesores y el número correspondiente de estudiantes", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 11, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT advisor , count(*) FROM Student GROUP BY advisor", "query_toks": [ "SELECT", "advisor", ",", "count", "(", "*", ")", "FROM", "Student", "GROUP", "BY", "advisor" ], "query_toks_no_value": [ "select", "advisor", ",", "count", "(", "*", ")", "from", "student", "group", "by", "advisor" ], "question": "¿Cuántos alumnos tiene cada asesor?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 11, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT advisor FROM Student GROUP BY advisor ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "advisor", "FROM", "Student", "GROUP", "BY", "advisor", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "advisor", "from", "student", "group", "by", "advisor", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "¿Qué profesor tiene más estudiantes?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 11, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT advisor FROM Student GROUP BY advisor ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "advisor", "FROM", "Student", "GROUP", "BY", "advisor", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "advisor", "from", "student", "group", "by", "advisor", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "Dé el profesor que tiene más estudiantes.", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 11, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 11, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT count(*) FROM Has_allergy WHERE Allergy = \"Cat\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Has_allergy", "WHERE", "Allergy", "=", "``", "Cat", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "has_allergy", "where", "allergy", "=", "value" ], "question": "¿Cuántos estudiantes tienen alergia al ''cat''?", "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"Cat\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT count(*) FROM Has_allergy WHERE Allergy = \"Cat\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Has_allergy", "WHERE", "Allergy", "=", "``", "Cat", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "has_allergy", "where", "allergy", "=", "value" ], "question": "¿Cuántos estudiantes se ven afectados por las alergias al ''cat''?", "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"Cat\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT StuID FROM Has_allergy GROUP BY StuID HAVING count(*) >= 2", "query_toks": [ "SELECT", "StuID", "FROM", "Has_allergy", "GROUP", "BY", "StuID", "HAVING", "count", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "stuid", "from", "has_allergy", "group", "by", "stuid", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "Muestre todas las identificaciones de los estudiantes que tengan al menos dos alergias.", "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 3, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT StuID FROM Has_allergy GROUP BY StuID HAVING count(*) >= 2", "query_toks": [ "SELECT", "StuID", "FROM", "Has_allergy", "GROUP", "BY", "StuID", "HAVING", "count", "(", "*", ")", ">", "=", "2" ], "query_toks_no_value": [ "select", "stuid", "from", "has_allergy", "group", "by", "stuid", "having", "count", "(", "*", ")", ">", "=", "value" ], "question": "¿Cuáles son las identificaciones de los estudiantes que tienen más de una alergia?", "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 3, false ] ], "having": [ [ false, 5, [ 0, [ 3, 0, false ], null ], 2.0, null ] ], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Has_allergy", "query_toks": [ "SELECT", "StuID", "FROM", "Student", "EXCEPT", "SELECT", "StuID", "FROM", "Has_allergy" ], "query_toks_no_value": [ "select", "stuid", "from", "student", "except", "select", "stuid", "from", "has_allergy" ], "question": "¿Cuáles son las identificaciones de los estudiantes que no tienen alergias?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, 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, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "allergy_1", "query": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Has_allergy", "query_toks": [ "SELECT", "StuID", "FROM", "Student", "EXCEPT", "SELECT", "StuID", "FROM", "Has_allergy" ], "query_toks_no_value": [ "select", "stuid", "from", "student", "except", "select", "stuid", "from", "has_allergy" ], "question": "¿Qué estudiantes no se ven afectados por las alergias?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 5, 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, 3, false ], null ] ] ] ], "where": [], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } }, { "db_id": "allergy_1", "query": "SELECT count(*) FROM has_allergy AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.sex = \"F\" AND T1.allergy = \"Milk\" OR T1.allergy = \"Eggs\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "has_allergy", "AS", "T1", "JOIN", "Student", "AS", "T2", "ON", "T1.StuID", "=", "T2.StuID", "WHERE", "T2.sex", "=", "``", "F", "''", "AND", "T1.allergy", "=", "``", "Milk", "''", "OR", "T1.allergy", "=", "``", "Eggs", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "has_allergy", "as", "t1", "join", "student", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "where", "t2", ".", "sex", "=", "value", "and", "t1", ".", "allergy", "=", "value", "or", "t1", ".", "allergy", "=", "value" ], "question": "¿Cuántas alumnas tienen alergia a la ''milk'' o al huevo?", "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 5, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"F\"", null ], "and", [ false, 2, [ 0, [ 0, 4, false ], null ], "\"Milk\"", null ], "or", [ false, 2, [ 0, [ 0, 4, false ], null ], "\"Eggs\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT count(*) FROM has_allergy AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.sex = \"F\" AND T1.allergy = \"Milk\" OR T1.allergy = \"Eggs\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "has_allergy", "AS", "T1", "JOIN", "Student", "AS", "T2", "ON", "T1.StuID", "=", "T2.StuID", "WHERE", "T2.sex", "=", "``", "F", "''", "AND", "T1.allergy", "=", "``", "Milk", "''", "OR", "T1.allergy", "=", "``", "Eggs", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "has_allergy", "as", "t1", "join", "student", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "where", "t2", ".", "sex", "=", "value", "and", "t1", ".", "allergy", "=", "value", "or", "t1", ".", "allergy", "=", "value" ], "question": "¿Cuántos estudiantes de sexo femenino son alérgicos a la ''milk'' o los ''eggs''?", "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 3, false ], null ], [ 0, 5, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"F\"", null ], "and", [ false, 2, [ 0, [ 0, 4, false ], null ], "\"Milk\"", null ], "or", [ false, 2, [ 0, [ 0, 4, false ], null ], "\"Eggs\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT count(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy WHERE T2.allergytype = \"food\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Has_allergy", "AS", "T1", "JOIN", "Allergy_type", "AS", "T2", "ON", "T1.allergy", "=", "T2.allergy", "WHERE", "T2.allergytype", "=", "``", "food", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "has_allergy", "as", "t1", "join", "allergy_type", "as", "t2", "on", "t1", ".", "allergy", "=", "t2", ".", "allergy", "where", "t2", ".", "allergytype", "=", "value" ], "question": "¿Cuántos estudiantes tienen alergia ''food''?", "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"food\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT count(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy WHERE T2.allergytype = \"food\"", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Has_allergy", "AS", "T1", "JOIN", "Allergy_type", "AS", "T2", "ON", "T1.allergy", "=", "T2.allergy", "WHERE", "T2.allergytype", "=", "``", "food", "''" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "has_allergy", "as", "t1", "join", "allergy_type", "as", "t2", "on", "t1", ".", "allergy", "=", "t2", ".", "allergy", "where", "t2", ".", "allergytype", "=", "value" ], "question": "¿Cuántos estudiantes se ven afectados por alergias relacionadas con los ''food''?", "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"food\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT Allergy FROM Has_allergy GROUP BY Allergy ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "Allergy", "FROM", "Has_allergy", "GROUP", "BY", "Allergy", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "allergy", "from", "has_allergy", "group", "by", "allergy", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "¿Qué alergia ha afectado a más alumnos?", "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 4, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT Allergy FROM Has_allergy GROUP BY Allergy ORDER BY count(*) DESC LIMIT 1", "query_toks": [ "SELECT", "Allergy", "FROM", "Has_allergy", "GROUP", "BY", "Allergy", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ], "query_toks_no_value": [ "select", "allergy", "from", "has_allergy", "group", "by", "allergy", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ], "question": "¿Qué alergia es la más común?", "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 4, false ] ], "having": [], "orderBy": [ "desc", [ [ 0, [ 3, 0, false ], null ] ] ], "limit": 1, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT Allergy , count(*) FROM Has_allergy GROUP BY Allergy", "query_toks": [ "SELECT", "Allergy", ",", "count", "(", "*", ")", "FROM", "Has_allergy", "GROUP", "BY", "Allergy" ], "query_toks_no_value": [ "select", "allergy", ",", "count", "(", "*", ")", "from", "has_allergy", "group", "by", "allergy" ], "question": "Muestre todas las alergias con el número de estudiantes afectados.", "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 4, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT Allergy , count(*) FROM Has_allergy GROUP BY Allergy", "query_toks": [ "SELECT", "Allergy", ",", "count", "(", "*", ")", "FROM", "Has_allergy", "GROUP", "BY", "Allergy" ], "query_toks_no_value": [ "select", "allergy", ",", "count", "(", "*", ")", "from", "has_allergy", "group", "by", "allergy" ], "question": "¿Cuántos estudiantes tienen cada alergia diferente?", "sql": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 4, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 4, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT T2.allergytype , count(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy GROUP BY T2.allergytype", "query_toks": [ "SELECT", "T2.allergytype", ",", "count", "(", "*", ")", "FROM", "Has_allergy", "AS", "T1", "JOIN", "Allergy_type", "AS", "T2", "ON", "T1.allergy", "=", "T2.allergy", "GROUP", "BY", "T2.allergytype" ], "query_toks_no_value": [ "select", "t2", ".", "allergytype", ",", "count", "(", "*", ")", "from", "has_allergy", "as", "t1", "join", "allergy_type", "as", "t2", "on", "t1", ".", "allergy", "=", "t2", ".", "allergy", "group", "by", "t2", ".", "allergytype" ], "question": "Muestre todos los tipos de alergia con el número de estudiantes afectados.", "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT T2.allergytype , count(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy GROUP BY T2.allergytype", "query_toks": [ "SELECT", "T2.allergytype", ",", "count", "(", "*", ")", "FROM", "Has_allergy", "AS", "T1", "JOIN", "Allergy_type", "AS", "T2", "ON", "T1.allergy", "=", "T2.allergy", "GROUP", "BY", "T2.allergytype" ], "query_toks_no_value": [ "select", "t2", ".", "allergytype", ",", "count", "(", "*", ")", "from", "has_allergy", "as", "t1", "join", "allergy_type", "as", "t2", "on", "t1", ".", "allergy", "=", "t2", ".", "allergy", "group", "by", "t2", ".", "allergytype" ], "question": "¿Cuántos estudiantes se ven afectados por cada tipo de alergia?", "sql": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 2, false ], null ] ], [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [], "groupBy": [ [ 0, 2, false ] ], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT lname , age FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = \"Milk\" INTERSECT SELECT StuID FROM Has_allergy WHERE Allergy = \"Cat\")", "query_toks": [ "SELECT", "lname", ",", "age", "FROM", "Student", "WHERE", "StuID", "IN", "(", "SELECT", "StuID", "FROM", "Has_allergy", "WHERE", "Allergy", "=", "``", "Milk", "''", "INTERSECT", "SELECT", "StuID", "FROM", "Has_allergy", "WHERE", "Allergy", "=", "``", "Cat", "''", ")" ], "query_toks_no_value": [ "select", "lname", ",", "age", "from", "student", "where", "stuid", "in", "(", "select", "stuid", "from", "has_allergy", "where", "allergy", "=", "value", "intersect", "select", "stuid", "from", "has_allergy", "where", "allergy", "=", "value", ")" ], "question": "Encuentre el apellido y la edad del estudiante que tiene alergia tanto a la ''milk'' como al ''cat''.", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [ [ false, 8, [ 0, [ 0, 5, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"Milk\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"Cat\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT lname , age FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = \"Milk\" INTERSECT SELECT StuID FROM Has_allergy WHERE Allergy = \"Cat\")", "query_toks": [ "SELECT", "lname", ",", "age", "FROM", "Student", "WHERE", "StuID", "IN", "(", "SELECT", "StuID", "FROM", "Has_allergy", "WHERE", "Allergy", "=", "``", "Milk", "''", "INTERSECT", "SELECT", "StuID", "FROM", "Has_allergy", "WHERE", "Allergy", "=", "``", "Cat", "''", ")" ], "query_toks_no_value": [ "select", "lname", ",", "age", "from", "student", "where", "stuid", "in", "(", "select", "stuid", "from", "has_allergy", "where", "allergy", "=", "value", "intersect", "select", "stuid", "from", "has_allergy", "where", "allergy", "=", "value", ")" ], "question": "¿Cuáles son los apellidos y las edades de los alumnos alérgicos a la ''milk'' y al ''cat''?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 6, false ], null ] ], [ 0, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [ [ false, 8, [ 0, [ 0, 5, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"Milk\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"Cat\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT T1.Allergy , T1.AllergyType FROM Allergy_type AS T1 JOIN Has_allergy AS T2 ON T1.Allergy = T2.Allergy JOIN Student AS T3 ON T3.StuID = T2.StuID WHERE T3.Fname = \"Lisa\" ORDER BY T1.Allergy", "query_toks": [ "SELECT", "T1.Allergy", ",", "T1.AllergyType", "FROM", "Allergy_type", "AS", "T1", "JOIN", "Has_allergy", "AS", "T2", "ON", "T1.Allergy", "=", "T2.Allergy", "JOIN", "Student", "AS", "T3", "ON", "T3.StuID", "=", "T2.StuID", "WHERE", "T3.Fname", "=", "``", "Lisa", "''", "ORDER", "BY", "T1.Allergy" ], "query_toks_no_value": [ "select", "t1", ".", "allergy", ",", "t1", ".", "allergytype", "from", "allergy_type", "as", "t1", "join", "has_allergy", "as", "t2", "on", "t1", ".", "allergy", "=", "t2", ".", "allergy", "join", "student", "as", "t3", "on", "t3", ".", "stuid", "=", "t2", ".", "stuid", "where", "t3", ".", "fname", "=", "value", "order", "by", "t1", ".", "allergy" ], "question": "¿Cuáles son las alergias y sus tipos que tiene la estudiante con el primer nombre ''Lisa''? Y ordene el resultado por nombre de alergias.", "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 4, false ], null ], "and", [ false, 2, [ 0, [ 0, 5, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 7, false ], null ], "\"Lisa\"", null ] ], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 1, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT T1.Allergy , T1.AllergyType FROM Allergy_type AS T1 JOIN Has_allergy AS T2 ON T1.Allergy = T2.Allergy JOIN Student AS T3 ON T3.StuID = T2.StuID WHERE T3.Fname = \"Lisa\" ORDER BY T1.Allergy", "query_toks": [ "SELECT", "T1.Allergy", ",", "T1.AllergyType", "FROM", "Allergy_type", "AS", "T1", "JOIN", "Has_allergy", "AS", "T2", "ON", "T1.Allergy", "=", "T2.Allergy", "JOIN", "Student", "AS", "T3", "ON", "T3.StuID", "=", "T2.StuID", "WHERE", "T3.Fname", "=", "``", "Lisa", "''", "ORDER", "BY", "T1.Allergy" ], "query_toks_no_value": [ "select", "t1", ".", "allergy", ",", "t1", ".", "allergytype", "from", "allergy_type", "as", "t1", "join", "has_allergy", "as", "t2", "on", "t1", ".", "allergy", "=", "t2", ".", "allergy", "join", "student", "as", "t3", "on", "t3", ".", "stuid", "=", "t2", ".", "stuid", "where", "t3", ".", "fname", "=", "value", "order", "by", "t1", ".", "allergy" ], "question": "¿Cuáles son las alergias que tiene la niña llamada ''Lisa''? ¿Y cuáles son los tipos de ellos? Ordene el resultado por nombres de alergia.", "sql": { "from": { "table_units": [ [ "table_unit", 0 ], [ "table_unit", 1 ], [ "table_unit", 2 ] ], "conds": [ [ false, 2, [ 0, [ 0, 1, false ], null ], [ 0, 4, false ], null ], "and", [ false, 2, [ 0, [ 0, 5, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 1, false ], null ] ], [ 0, [ 0, [ 0, 2, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 7, false ], null ], "\"Lisa\"", null ] ], "groupBy": [], "having": [], "orderBy": [ "asc", [ [ 0, [ 0, 1, false ], null ] ] ], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT fname , sex FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = \"Milk\" EXCEPT SELECT StuID FROM Has_allergy WHERE Allergy = \"Cat\")", "query_toks": [ "SELECT", "fname", ",", "sex", "FROM", "Student", "WHERE", "StuID", "IN", "(", "SELECT", "StuID", "FROM", "Has_allergy", "WHERE", "Allergy", "=", "``", "Milk", "''", "EXCEPT", "SELECT", "StuID", "FROM", "Has_allergy", "WHERE", "Allergy", "=", "``", "Cat", "''", ")" ], "query_toks_no_value": [ "select", "fname", ",", "sex", "from", "student", "where", "stuid", "in", "(", "select", "stuid", "from", "has_allergy", "where", "allergy", "=", "value", "except", "select", "stuid", "from", "has_allergy", "where", "allergy", "=", "value", ")" ], "question": "Busque el nombre y el sexo del estudiante que tiene alergia a la ''milk'' pero no al ''cat''.", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ], [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 8, [ 0, [ 0, 5, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"Milk\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"Cat\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT fname , sex FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = \"Milk\" EXCEPT SELECT StuID FROM Has_allergy WHERE Allergy = \"Cat\")", "query_toks": [ "SELECT", "fname", ",", "sex", "FROM", "Student", "WHERE", "StuID", "IN", "(", "SELECT", "StuID", "FROM", "Has_allergy", "WHERE", "Allergy", "=", "``", "Milk", "''", "EXCEPT", "SELECT", "StuID", "FROM", "Has_allergy", "WHERE", "Allergy", "=", "``", "Cat", "''", ")" ], "query_toks_no_value": [ "select", "fname", ",", "sex", "from", "student", "where", "stuid", "in", "(", "select", "stuid", "from", "has_allergy", "where", "allergy", "=", "value", "except", "select", "stuid", "from", "has_allergy", "where", "allergy", "=", "value", ")" ], "question": "¿Cuáles son el nombre y el sexo de los estudiantes que son alérgicos a la ''milk'' pero pueden aguantar a los ''cats''?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ], [ 0, [ 0, [ 0, 9, false ], null ] ] ] ], "where": [ [ false, 8, [ 0, [ 0, 5, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"Milk\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"Cat\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT avg(age) FROM Student WHERE StuID IN ( SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"food\" INTERSECT SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"animal\")", "query_toks": [ "SELECT", "avg", "(", "age", ")", "FROM", "Student", "WHERE", "StuID", "IN", "(", "SELECT", "T1.StuID", "FROM", "Has_allergy", "AS", "T1", "JOIN", "Allergy_Type", "AS", "T2", "ON", "T1.Allergy", "=", "T2.Allergy", "WHERE", "T2.allergytype", "=", "``", "food", "''", "INTERSECT", "SELECT", "T1.StuID", "FROM", "Has_allergy", "AS", "T1", "JOIN", "Allergy_Type", "AS", "T2", "ON", "T1.Allergy", "=", "T2.Allergy", "WHERE", "T2.allergytype", "=", "``", "animal", "''", ")" ], "query_toks_no_value": [ "select", "avg", "(", "age", ")", "from", "student", "where", "stuid", "in", "(", "select", "t1", ".", "stuid", "from", "has_allergy", "as", "t1", "join", "allergy_type", "as", "t2", "on", "t1", ".", "allergy", "=", "t2", ".", "allergy", "where", "t2", ".", "allergytype", "=", "value", "intersect", "select", "t1", ".", "stuid", "from", "has_allergy", "as", "t1", "join", "allergy_type", "as", "t2", "on", "t1", ".", "allergy", "=", "t2", ".", "allergy", "where", "t2", ".", "allergytype", "=", "value", ")" ], "question": "Encuentre la edad media de los estudiantes que tienen alergias a ''food'' y tipos de ''animal''.", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [ [ false, 8, [ 0, [ 0, 5, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"food\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"animal\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT avg(age) FROM Student WHERE StuID IN ( SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"food\" INTERSECT SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"animal\")", "query_toks": [ "SELECT", "avg", "(", "age", ")", "FROM", "Student", "WHERE", "StuID", "IN", "(", "SELECT", "T1.StuID", "FROM", "Has_allergy", "AS", "T1", "JOIN", "Allergy_Type", "AS", "T2", "ON", "T1.Allergy", "=", "T2.Allergy", "WHERE", "T2.allergytype", "=", "``", "food", "''", "INTERSECT", "SELECT", "T1.StuID", "FROM", "Has_allergy", "AS", "T1", "JOIN", "Allergy_Type", "AS", "T2", "ON", "T1.Allergy", "=", "T2.Allergy", "WHERE", "T2.allergytype", "=", "``", "animal", "''", ")" ], "query_toks_no_value": [ "select", "avg", "(", "age", ")", "from", "student", "where", "stuid", "in", "(", "select", "t1", ".", "stuid", "from", "has_allergy", "as", "t1", "join", "allergy_type", "as", "t2", "on", "t1", ".", "allergy", "=", "t2", ".", "allergy", "where", "t2", ".", "allergytype", "=", "value", "intersect", "select", "t1", ".", "stuid", "from", "has_allergy", "as", "t1", "join", "allergy_type", "as", "t2", "on", "t1", ".", "allergy", "=", "t2", ".", "allergy", "where", "t2", ".", "allergytype", "=", "value", ")" ], "question": "¿Qué edad tienen en promedio los estudiantes con alergias a ''food'' y tipos de ''animal''?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 5, [ 0, [ 0, 8, false ], null ] ] ] ], "where": [ [ false, 8, [ 0, [ 0, 5, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"food\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"animal\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, "union": null, "except": null }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT fname , lname FROM Student WHERE StuID NOT IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"food\")", "query_toks": [ "SELECT", "fname", ",", "lname", "FROM", "Student", "WHERE", "StuID", "NOT", "IN", "(", "SELECT", "T1.StuID", "FROM", "Has_allergy", "AS", "T1", "JOIN", "Allergy_Type", "AS", "T2", "ON", "T1.Allergy", "=", "T2.Allergy", "WHERE", "T2.allergytype", "=", "``", "food", "''", ")" ], "query_toks_no_value": [ "select", "fname", ",", "lname", "from", "student", "where", "stuid", "not", "in", "(", "select", "t1", ".", "stuid", "from", "has_allergy", "as", "t1", "join", "allergy_type", "as", "t2", "on", "t1", ".", "allergy", "=", "t2", ".", "allergy", "where", "t2", ".", "allergytype", "=", "value", ")" ], "question": "Indique el nombre y apellido de los estudiantes que no tienen ningún tipo de alergia ''food''.", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 5, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"food\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT fname , lname FROM Student WHERE StuID NOT IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"food\")", "query_toks": [ "SELECT", "fname", ",", "lname", "FROM", "Student", "WHERE", "StuID", "NOT", "IN", "(", "SELECT", "T1.StuID", "FROM", "Has_allergy", "AS", "T1", "JOIN", "Allergy_Type", "AS", "T2", "ON", "T1.Allergy", "=", "T2.Allergy", "WHERE", "T2.allergytype", "=", "``", "food", "''", ")" ], "query_toks_no_value": [ "select", "fname", ",", "lname", "from", "student", "where", "stuid", "not", "in", "(", "select", "t1", ".", "stuid", "from", "has_allergy", "as", "t1", "join", "allergy_type", "as", "t2", "on", "t1", ".", "allergy", "=", "t2", ".", "allergy", "where", "t2", ".", "allergytype", "=", "value", ")" ], "question": "¿Cuál es el nombre completo de cada estudiante que no sea alérgico a ningún tipo de ''food''?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ], [ 0, [ 0, [ 0, 6, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 5, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"food\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT count(*) FROM Student WHERE sex = \"M\" AND StuID IN (SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"food\")", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Student", "WHERE", "sex", "=", "``", "M", "''", "AND", "StuID", "IN", "(", "SELECT", "StuID", "FROM", "Has_allergy", "AS", "T1", "JOIN", "Allergy_Type", "AS", "T2", "ON", "T1.Allergy", "=", "T2.Allergy", "WHERE", "T2.allergytype", "=", "``", "food", "''", ")" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "student", "where", "sex", "=", "value", "and", "stuid", "in", "(", "select", "stuid", "from", "has_allergy", "as", "t1", "join", "allergy_type", "as", "t2", "on", "t1", ".", "allergy", "=", "t2", ".", "allergy", "where", "t2", ".", "allergytype", "=", "value", ")" ], "question": "Encuentre el número de estudiantes varones (el sexo es ''M'') que tienen algún tipo de ''food''.", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"M\"", null ], "and", [ false, 8, [ 0, [ 0, 5, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"food\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT count(*) FROM Student WHERE sex = \"M\" AND StuID IN (SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"food\")", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Student", "WHERE", "sex", "=", "``", "M", "''", "AND", "StuID", "IN", "(", "SELECT", "StuID", "FROM", "Has_allergy", "AS", "T1", "JOIN", "Allergy_Type", "AS", "T2", "ON", "T1.Allergy", "=", "T2.Allergy", "WHERE", "T2.allergytype", "=", "``", "food", "''", ")" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "student", "where", "sex", "=", "value", "and", "stuid", "in", "(", "select", "stuid", "from", "has_allergy", "as", "t1", "join", "allergy_type", "as", "t2", "on", "t1", ".", "allergy", "=", "t2", ".", "allergy", "where", "t2", ".", "allergytype", "=", "value", ")" ], "question": "¿Cuántos estudiantes varones (el sexo es ''M'') son alérgicos a cualquier tipo de ''food'?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 9, false ], null ], "\"M\"", null ], "and", [ false, 8, [ 0, [ 0, 5, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"food\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT DISTINCT T1.fname , T1.city_code FROM Student AS T1 JOIN Has_Allergy AS T2 ON T1.stuid = T2.stuid WHERE T2.Allergy = \"Milk\" OR T2.Allergy = \"Cat\"", "query_toks": [ "SELECT", "DISTINCT", "T1.fname", ",", "T1.city_code", "FROM", "Student", "AS", "T1", "JOIN", "Has_Allergy", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "WHERE", "T2.Allergy", "=", "``", "Milk", "''", "OR", "T2.Allergy", "=", "``", "Cat", "''" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "fname", ",", "t1", ".", "city_code", "from", "student", "as", "t1", "join", "has_allergy", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "where", "t2", ".", "allergy", "=", "value", "or", "t2", ".", "allergy", "=", "value" ], "question": "Encuentre los diferentes nombres y ciudades de los estudiantes que tienen alergia a la ''milk'' o al ''cat''.", "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 5, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 7, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"Milk\"", null ], "or", [ false, 2, [ 0, [ 0, 4, false ], null ], "\"Cat\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT DISTINCT T1.fname , T1.city_code FROM Student AS T1 JOIN Has_Allergy AS T2 ON T1.stuid = T2.stuid WHERE T2.Allergy = \"Milk\" OR T2.Allergy = \"Cat\"", "query_toks": [ "SELECT", "DISTINCT", "T1.fname", ",", "T1.city_code", "FROM", "Student", "AS", "T1", "JOIN", "Has_Allergy", "AS", "T2", "ON", "T1.stuid", "=", "T2.stuid", "WHERE", "T2.Allergy", "=", "``", "Milk", "''", "OR", "T2.Allergy", "=", "``", "Cat", "''" ], "query_toks_no_value": [ "select", "distinct", "t1", ".", "fname", ",", "t1", ".", "city_code", "from", "student", "as", "t1", "join", "has_allergy", "as", "t2", "on", "t1", ".", "stuid", "=", "t2", ".", "stuid", "where", "t2", ".", "allergy", "=", "value", "or", "t2", ".", "allergy", "=", "value" ], "question": "¿Cuáles son los nombres y las ciudades distintos de los estudiantes que tienen alergia a la ''milk'' o al ''cat''?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ], [ "table_unit", 1 ] ], "conds": [ [ false, 2, [ 0, [ 0, 5, false ], null ], [ 0, 3, false ], null ] ] }, "select": [ true, [ [ 0, [ 0, [ 0, 7, false ], null ] ], [ 0, [ 0, [ 0, 12, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"Milk\"", null ], "or", [ false, 2, [ 0, [ 0, 4, false ], null ], "\"Cat\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT count(*) FROM Student WHERE age > 18 AND StuID NOT IN ( SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"food\" OR T2.allergytype = \"animal\")", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Student", "WHERE", "age", ">", "18", "AND", "StuID", "NOT", "IN", "(", "SELECT", "StuID", "FROM", "Has_allergy", "AS", "T1", "JOIN", "Allergy_Type", "AS", "T2", "ON", "T1.Allergy", "=", "T2.Allergy", "WHERE", "T2.allergytype", "=", "``", "food", "''", "OR", "T2.allergytype", "=", "``", "animal", "''", ")" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "student", "where", "age", ">", "value", "and", "stuid", "not", "in", "(", "select", "stuid", "from", "has_allergy", "as", "t1", "join", "allergy_type", "as", "t2", "on", "t1", ".", "allergy", "=", "t2", ".", "allergy", "where", "t2", ".", "allergytype", "=", "value", "or", "t2", ".", "allergytype", "=", "value", ")" ], "question": "Encuentre el número de estudiantes que tienen más de 18 años y no son alérgicos a los ''food'' ni a los ''animal''", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 8, false ], null ], 18.0, null ], "and", [ true, 8, [ 0, [ 0, 5, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"food\"", null ], "or", [ false, 2, [ 0, [ 0, 2, false ], null ], "\"animal\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT count(*) FROM Student WHERE age > 18 AND StuID NOT IN ( SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"food\" OR T2.allergytype = \"animal\")", "query_toks": [ "SELECT", "count", "(", "*", ")", "FROM", "Student", "WHERE", "age", ">", "18", "AND", "StuID", "NOT", "IN", "(", "SELECT", "StuID", "FROM", "Has_allergy", "AS", "T1", "JOIN", "Allergy_Type", "AS", "T2", "ON", "T1.Allergy", "=", "T2.Allergy", "WHERE", "T2.allergytype", "=", "``", "food", "''", "OR", "T2.allergytype", "=", "``", "animal", "''", ")" ], "query_toks_no_value": [ "select", "count", "(", "*", ")", "from", "student", "where", "age", ">", "value", "and", "stuid", "not", "in", "(", "select", "stuid", "from", "has_allergy", "as", "t1", "join", "allergy_type", "as", "t2", "on", "t1", ".", "allergy", "=", "t2", ".", "allergy", "where", "t2", ".", "allergytype", "=", "value", "or", "t2", ".", "allergytype", "=", "value", ")" ], "question": "¿Cuántos estudiantes tienen más de 18 años y no son alérgicos al tipo de ''food'' o ''animal''?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 3, [ 0, [ 0, 0, false ], null ] ] ] ], "where": [ [ false, 3, [ 0, [ 0, 8, false ], null ], 18.0, null ], "and", [ true, 8, [ 0, [ 0, 5, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ], [ "table_unit", 0 ] ], "conds": [ [ false, 2, [ 0, [ 0, 4, false ], null ], [ 0, 1, false ], null ] ] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 2, false ], null ], "\"food\"", null ], "or", [ false, 2, [ 0, [ 0, 2, false ], null ], "\"animal\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT fname , major FROM Student WHERE StuID NOT IN (SELECT StuID FROM Has_allergy WHERE Allergy = \"Soy\")", "query_toks": [ "SELECT", "fname", ",", "major", "FROM", "Student", "WHERE", "StuID", "NOT", "IN", "(", "SELECT", "StuID", "FROM", "Has_allergy", "WHERE", "Allergy", "=", "``", "Soy", "''", ")" ], "query_toks_no_value": [ "select", "fname", ",", "major", "from", "student", "where", "stuid", "not", "in", "(", "select", "stuid", "from", "has_allergy", "where", "allergy", "=", "value", ")" ], "question": "Encuentre el nombre y la especialidad de los estudiantes que no son alegatos de la ''soy''.", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ], [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 5, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"Soy\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } }, { "db_id": "allergy_1", "query": "SELECT fname , major FROM Student WHERE StuID NOT IN (SELECT StuID FROM Has_allergy WHERE Allergy = \"Soy\")", "query_toks": [ "SELECT", "fname", ",", "major", "FROM", "Student", "WHERE", "StuID", "NOT", "IN", "(", "SELECT", "StuID", "FROM", "Has_allergy", "WHERE", "Allergy", "=", "``", "Soy", "''", ")" ], "query_toks_no_value": [ "select", "fname", ",", "major", "from", "student", "where", "stuid", "not", "in", "(", "select", "stuid", "from", "has_allergy", "where", "allergy", "=", "value", ")" ], "question": "¿Cuál es el nombre y la especialidad de los estudiantes que pueden consumir ''soy''?", "sql": { "from": { "table_units": [ [ "table_unit", 2 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 7, false ], null ] ], [ 0, [ 0, [ 0, 10, false ], null ] ] ] ], "where": [ [ true, 8, [ 0, [ 0, 5, false ], null ], { "from": { "table_units": [ [ "table_unit", 1 ] ], "conds": [] }, "select": [ false, [ [ 0, [ 0, [ 0, 3, false ], null ] ] ] ], "where": [ [ false, 2, [ 0, [ 0, 4, false ], null ], "\"Soy\"", null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null }, null ] ], "groupBy": [], "having": [], "orderBy": [], "limit": null, "intersect": null, "union": null, "except": null } } ]