dreamerdeo's picture
Upload folder using huggingface_hub
1faca1c
[
{
"db_id": "behavior_monitoring",
"query": "SELECT count(*) FROM ASSESSMENT_NOTES",
"query_toks": [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"ASSESSMENT_NOTES"
],
"query_toks_no_value": [
"select",
"count",
"(",
"*",
")",
"from",
"assessment_notes"
],
"question": "How many assessment notes are there in total?",
"question_toks": [
"How",
"many",
"assessment",
"notes",
"are",
"there",
"in",
"total",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
6
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
3,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT date_of_notes FROM Assessment_Notes",
"query_toks": [
"SELECT",
"date_of_notes",
"FROM",
"Assessment_Notes"
],
"query_toks_no_value": [
"select",
"date_of_notes",
"from",
"assessment_notes"
],
"question": "What are the dates of the assessment notes?",
"question_toks": [
"What",
"are",
"the",
"dates",
"of",
"the",
"assessment",
"notes",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
6
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
38,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT count(*) FROM ADDRESSES WHERE zip_postcode = \"197\"",
"query_toks": [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"ADDRESSES",
"WHERE",
"zip_postcode",
"=",
"``",
"197",
"''"
],
"query_toks_no_value": [
"select",
"count",
"(",
"*",
")",
"from",
"addresses",
"where",
"zip_postcode",
"=",
"value"
],
"question": "How many addresses have zip code 197?",
"question_toks": [
"How",
"many",
"addresses",
"have",
"zip",
"code",
"197",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
3
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
3,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
12,
false
],
null
],
"\"197\"",
null
]
]
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT count(DISTINCT incident_type_code) FROM Behavior_Incident",
"query_toks": [
"SELECT",
"count",
"(",
"DISTINCT",
"incident_type_code",
")",
"FROM",
"Behavior_Incident"
],
"query_toks_no_value": [
"select",
"count",
"(",
"distinct",
"incident_type_code",
")",
"from",
"behavior_incident"
],
"question": "How many distinct incident type codes are there?",
"question_toks": [
"How",
"many",
"distinct",
"incident",
"type",
"codes",
"are",
"there",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
7
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
3,
[
0,
[
0,
42,
true
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT DISTINCT detention_type_code FROM Detention",
"query_toks": [
"SELECT",
"DISTINCT",
"detention_type_code",
"FROM",
"Detention"
],
"query_toks_no_value": [
"select",
"distinct",
"detention_type_code",
"from",
"detention"
],
"question": "Return all distinct detention type codes.",
"question_toks": [
"Return",
"all",
"distinct",
"detention",
"type",
"codes",
"."
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
8
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
true,
[
[
0,
[
0,
[
0,
50,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT date_incident_start , date_incident_end FROM Behavior_Incident WHERE incident_type_code = \"NOISE\"",
"query_toks": [
"SELECT",
"date_incident_start",
",",
"date_incident_end",
"FROM",
"Behavior_Incident",
"WHERE",
"incident_type_code",
"=",
"``",
"NOISE",
"''"
],
"query_toks_no_value": [
"select",
"date_incident_start",
",",
"date_incident_end",
"from",
"behavior_incident",
"where",
"incident_type_code",
"=",
"value"
],
"question": "What are the start and end dates for incidents with incident type code \"NOISE\"?",
"question_toks": [
"What",
"are",
"the",
"start",
"and",
"end",
"dates",
"for",
"incidents",
"with",
"incident",
"type",
"code",
"``",
"NOISE",
"''",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
7
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
44,
false
],
null
]
],
[
0,
[
0,
[
0,
45,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
42,
false
],
null
],
"\"NOISE\"",
null
]
]
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT detention_summary FROM Detention",
"query_toks": [
"SELECT",
"detention_summary",
"FROM",
"Detention"
],
"query_toks_no_value": [
"select",
"detention_summary",
"from",
"detention"
],
"question": "Return all detention summaries.",
"question_toks": [
"Return",
"all",
"detention",
"summaries",
"."
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
8
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
54,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT cell_mobile_number , email_address FROM STUDENTS",
"query_toks": [
"SELECT",
"cell_mobile_number",
",",
"email_address",
"FROM",
"STUDENTS"
],
"query_toks_no_value": [
"select",
"cell_mobile_number",
",",
"email_address",
"from",
"students"
],
"question": "Return the cell phone number and email address for all students.",
"question_toks": [
"Return",
"the",
"cell",
"phone",
"number",
"and",
"email",
"address",
"for",
"all",
"students",
"."
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
4
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
21,
false
],
null
]
],
[
0,
[
0,
[
0,
22,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT email_address FROM Students WHERE first_name = \"Emma\" AND last_name = \"Rohan\"",
"query_toks": [
"SELECT",
"email_address",
"FROM",
"Students",
"WHERE",
"first_name",
"=",
"``",
"Emma",
"''",
"AND",
"last_name",
"=",
"``",
"Rohan",
"''"
],
"query_toks_no_value": [
"select",
"email_address",
"from",
"students",
"where",
"first_name",
"=",
"value",
"and",
"last_name",
"=",
"value"
],
"question": "What is the email of the student with first name \"Emma\" and last name \"Rohan\"?",
"question_toks": [
"What",
"is",
"the",
"email",
"of",
"the",
"student",
"with",
"first",
"name",
"``",
"Emma",
"''",
"and",
"last",
"name",
"``",
"Rohan",
"''",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
4
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
22,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
18,
false
],
null
],
"\"Emma\"",
null
],
"and",
[
false,
2,
[
0,
[
0,
20,
false
],
null
],
"\"Rohan\"",
null
]
]
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT count(DISTINCT student_id) FROM Students_in_Detention",
"query_toks": [
"SELECT",
"count",
"(",
"DISTINCT",
"student_id",
")",
"FROM",
"Students_in_Detention"
],
"query_toks_no_value": [
"select",
"count",
"(",
"distinct",
"student_id",
")",
"from",
"students_in_detention"
],
"question": "How many distinct students have been in detention?",
"question_toks": [
"How",
"many",
"distinct",
"students",
"have",
"been",
"in",
"detention",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
10
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
3,
[
0,
[
0,
62,
true
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT gender FROM TEACHERS WHERE last_name = \"Medhurst\"",
"query_toks": [
"SELECT",
"gender",
"FROM",
"TEACHERS",
"WHERE",
"last_name",
"=",
"``",
"Medhurst",
"''"
],
"query_toks_no_value": [
"select",
"gender",
"from",
"teachers",
"where",
"last_name",
"=",
"value"
],
"question": "What is the gender of the teacher with last name \"Medhurst\"?",
"question_toks": [
"What",
"is",
"the",
"gender",
"of",
"the",
"teacher",
"with",
"last",
"name",
"``",
"Medhurst",
"''",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
5
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
31,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
30,
false
],
null
],
"\"Medhurst\"",
null
]
]
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT incident_type_description FROM Ref_Incident_Type WHERE incident_type_code = \"VIOLENCE\"",
"query_toks": [
"SELECT",
"incident_type_description",
"FROM",
"Ref_Incident_Type",
"WHERE",
"incident_type_code",
"=",
"``",
"VIOLENCE",
"''"
],
"query_toks_no_value": [
"select",
"incident_type_description",
"from",
"ref_incident_type",
"where",
"incident_type_code",
"=",
"value"
],
"question": "What is the incident type description for the incident type with code \"VIOLENCE\"?",
"question_toks": [
"What",
"is",
"the",
"incident",
"type",
"description",
"for",
"the",
"incident",
"type",
"with",
"code",
"``",
"VIOLENCE",
"''",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
2
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
6,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
5,
false
],
null
],
"\"VIOLENCE\"",
null
]
]
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT max(monthly_rental) , min(monthly_rental) FROM Student_Addresses",
"query_toks": [
"SELECT",
"max",
"(",
"monthly_rental",
")",
",",
"min",
"(",
"monthly_rental",
")",
"FROM",
"Student_Addresses"
],
"query_toks_no_value": [
"select",
"max",
"(",
"monthly_rental",
")",
",",
"min",
"(",
"monthly_rental",
")",
"from",
"student_addresses"
],
"question": "Find the maximum and minimum monthly rental for all student addresses.",
"question_toks": [
"Find",
"the",
"maximum",
"and",
"minimum",
"monthly",
"rental",
"for",
"all",
"student",
"addresses",
"."
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
9
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
1,
[
0,
[
0,
60,
false
],
null
]
],
[
2,
[
0,
[
0,
60,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT first_name FROM Teachers WHERE email_address LIKE '%man%'",
"query_toks": [
"SELECT",
"first_name",
"FROM",
"Teachers",
"WHERE",
"email_address",
"LIKE",
"'",
"%",
"man",
"%",
"'"
],
"query_toks_no_value": [
"select",
"first_name",
"from",
"teachers",
"where",
"email_address",
"like",
"value"
],
"question": "Find the first names of teachers whose email address contains the word \"man\".",
"question_toks": [
"Find",
"the",
"first",
"names",
"of",
"teachers",
"whose",
"email",
"address",
"contains",
"the",
"word",
"``",
"man",
"''",
"."
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
5
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
28,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
9,
[
0,
[
0,
33,
false
],
null
],
"\"%man%\"",
null
]
]
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT * FROM Assessment_Notes ORDER BY date_of_notes ASC",
"query_toks": [
"SELECT",
"*",
"FROM",
"Assessment_Notes",
"ORDER",
"BY",
"date_of_notes",
"ASC"
],
"query_toks_no_value": [
"select",
"*",
"from",
"assessment_notes",
"order",
"by",
"date_of_notes",
"asc"
],
"question": "List all information about the assessment notes sorted by date in ascending order.",
"question_toks": [
"List",
"all",
"information",
"about",
"the",
"assessment",
"notes",
"sorted",
"by",
"date",
"in",
"ascending",
"order",
"."
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
6
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [
"asc",
[
[
0,
[
0,
38,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT city FROM Addresses ORDER BY city",
"query_toks": [
"SELECT",
"city",
"FROM",
"Addresses",
"ORDER",
"BY",
"city"
],
"query_toks_no_value": [
"select",
"city",
"from",
"addresses",
"order",
"by",
"city"
],
"question": "List all cities of addresses in alphabetical order.",
"question_toks": [
"List",
"all",
"cities",
"of",
"addresses",
"in",
"alphabetical",
"order",
"."
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
3
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [
"asc",
[
[
0,
[
0,
11,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
11,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT first_name , last_name FROM Teachers ORDER BY last_name",
"query_toks": [
"SELECT",
"first_name",
",",
"last_name",
"FROM",
"Teachers",
"ORDER",
"BY",
"last_name"
],
"query_toks_no_value": [
"select",
"first_name",
",",
"last_name",
"from",
"teachers",
"order",
"by",
"last_name"
],
"question": "Find the first names and last names of teachers in alphabetical order of last name.",
"question_toks": [
"Find",
"the",
"first",
"names",
"and",
"last",
"names",
"of",
"teachers",
"in",
"alphabetical",
"order",
"of",
"last",
"name",
"."
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
5
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [
"asc",
[
[
0,
[
0,
30,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
28,
false
],
null
]
],
[
0,
[
0,
[
0,
30,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT * FROM Student_Addresses ORDER BY monthly_rental DESC",
"query_toks": [
"SELECT",
"*",
"FROM",
"Student_Addresses",
"ORDER",
"BY",
"monthly_rental",
"DESC"
],
"query_toks_no_value": [
"select",
"*",
"from",
"student_addresses",
"order",
"by",
"monthly_rental",
"desc"
],
"question": "Find all information about student addresses, and sort by monthly rental in descending order.",
"question_toks": [
"Find",
"all",
"information",
"about",
"student",
"addresses",
",",
"and",
"sort",
"by",
"monthly",
"rental",
"in",
"descending",
"order",
"."
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
9
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [
"desc",
[
[
0,
[
0,
60,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT T1.student_id , T2.first_name FROM Assessment_Notes AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1",
"query_toks": [
"SELECT",
"T1.student_id",
",",
"T2.first_name",
"FROM",
"Assessment_Notes",
"AS",
"T1",
"JOIN",
"Students",
"AS",
"T2",
"ON",
"T1.student_id",
"=",
"T2.student_id",
"GROUP",
"BY",
"T1.student_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
],
"query_toks_no_value": [
"select",
"t1",
".",
"student_id",
",",
"t2",
".",
"first_name",
"from",
"assessment_notes",
"as",
"t1",
"join",
"students",
"as",
"t2",
"on",
"t1",
".",
"student_id",
"=",
"t2",
".",
"student_id",
"group",
"by",
"t1",
".",
"student_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
],
"question": "Find the id and first name of the student that has the most number of assessment notes?",
"question_toks": [
"Find",
"the",
"id",
"and",
"first",
"name",
"of",
"the",
"student",
"that",
"has",
"the",
"most",
"number",
"of",
"assessment",
"notes",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
36,
false
],
null
],
[
0,
16,
false
],
null
]
],
"table_units": [
[
"table_unit",
6
],
[
"table_unit",
4
]
]
},
"groupBy": [
[
0,
36,
false
]
],
"having": [],
"intersect": null,
"limit": 1,
"orderBy": [
"desc",
[
[
0,
[
3,
0,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
36,
false
],
null
]
],
[
0,
[
0,
[
0,
18,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT T1.teacher_id , T2.first_name FROM Assessment_Notes AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id GROUP BY T1.teacher_id ORDER BY count(*) DESC LIMIT 3",
"query_toks": [
"SELECT",
"T1.teacher_id",
",",
"T2.first_name",
"FROM",
"Assessment_Notes",
"AS",
"T1",
"JOIN",
"Teachers",
"AS",
"T2",
"ON",
"T1.teacher_id",
"=",
"T2.teacher_id",
"GROUP",
"BY",
"T1.teacher_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"3"
],
"query_toks_no_value": [
"select",
"t1",
".",
"teacher_id",
",",
"t2",
".",
"first_name",
"from",
"assessment_notes",
"as",
"t1",
"join",
"teachers",
"as",
"t2",
"on",
"t1",
".",
"teacher_id",
"=",
"t2",
".",
"teacher_id",
"group",
"by",
"t1",
".",
"teacher_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
],
"question": "Find the ids and first names of the 3 teachers that have the most number of assessment notes?",
"question_toks": [
"Find",
"the",
"ids",
"and",
"first",
"names",
"of",
"the",
"3",
"teachers",
"that",
"have",
"the",
"most",
"number",
"of",
"assessment",
"notes",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
37,
false
],
null
],
[
0,
26,
false
],
null
]
],
"table_units": [
[
"table_unit",
6
],
[
"table_unit",
5
]
]
},
"groupBy": [
[
0,
37,
false
]
],
"having": [],
"intersect": null,
"limit": 3,
"orderBy": [
"desc",
[
[
0,
[
3,
0,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
37,
false
],
null
]
],
[
0,
[
0,
[
0,
28,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT T1.student_id , T2.last_name FROM Behavior_Incident AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1",
"query_toks": [
"SELECT",
"T1.student_id",
",",
"T2.last_name",
"FROM",
"Behavior_Incident",
"AS",
"T1",
"JOIN",
"Students",
"AS",
"T2",
"ON",
"T1.student_id",
"=",
"T2.student_id",
"GROUP",
"BY",
"T1.student_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
],
"query_toks_no_value": [
"select",
"t1",
".",
"student_id",
",",
"t2",
".",
"last_name",
"from",
"behavior_incident",
"as",
"t1",
"join",
"students",
"as",
"t2",
"on",
"t1",
".",
"student_id",
"=",
"t2",
".",
"student_id",
"group",
"by",
"t1",
".",
"student_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
],
"question": "Find the id and last name of the student that has the most behavior incidents?",
"question_toks": [
"Find",
"the",
"id",
"and",
"last",
"name",
"of",
"the",
"student",
"that",
"has",
"the",
"most",
"behavior",
"incidents",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
43,
false
],
null
],
[
0,
16,
false
],
null
]
],
"table_units": [
[
"table_unit",
7
],
[
"table_unit",
4
]
]
},
"groupBy": [
[
0,
43,
false
]
],
"having": [],
"intersect": null,
"limit": 1,
"orderBy": [
"desc",
[
[
0,
[
3,
0,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
43,
false
],
null
]
],
[
0,
[
0,
[
0,
20,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT T1.teacher_id , T2.last_name FROM Detention AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id WHERE T1.detention_type_code = \"AFTER\" GROUP BY T1.teacher_id ORDER BY count(*) DESC LIMIT 1",
"query_toks": [
"SELECT",
"T1.teacher_id",
",",
"T2.last_name",
"FROM",
"Detention",
"AS",
"T1",
"JOIN",
"Teachers",
"AS",
"T2",
"ON",
"T1.teacher_id",
"=",
"T2.teacher_id",
"WHERE",
"T1.detention_type_code",
"=",
"``",
"AFTER",
"''",
"GROUP",
"BY",
"T1.teacher_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
],
"query_toks_no_value": [
"select",
"t1",
".",
"teacher_id",
",",
"t2",
".",
"last_name",
"from",
"detention",
"as",
"t1",
"join",
"teachers",
"as",
"t2",
"on",
"t1",
".",
"teacher_id",
"=",
"t2",
".",
"teacher_id",
"where",
"t1",
".",
"detention_type_code",
"=",
"value",
"group",
"by",
"t1",
".",
"teacher_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
],
"question": "Find the id and last name of the teacher that has the most detentions with detention type code \"AFTER\"?",
"question_toks": [
"Find",
"the",
"id",
"and",
"last",
"name",
"of",
"the",
"teacher",
"that",
"has",
"the",
"most",
"detentions",
"with",
"detention",
"type",
"code",
"``",
"AFTER",
"''",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
51,
false
],
null
],
[
0,
26,
false
],
null
]
],
"table_units": [
[
"table_unit",
8
],
[
"table_unit",
5
]
]
},
"groupBy": [
[
0,
51,
false
]
],
"having": [],
"intersect": null,
"limit": 1,
"orderBy": [
"desc",
[
[
0,
[
3,
0,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
51,
false
],
null
]
],
[
0,
[
0,
[
0,
30,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
50,
false
],
null
],
"\"AFTER\"",
null
]
]
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT T1.student_id , T2.first_name FROM Student_Addresses AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY AVG(monthly_rental) DESC LIMIT 1",
"query_toks": [
"SELECT",
"T1.student_id",
",",
"T2.first_name",
"FROM",
"Student_Addresses",
"AS",
"T1",
"JOIN",
"Students",
"AS",
"T2",
"ON",
"T1.student_id",
"=",
"T2.student_id",
"GROUP",
"BY",
"T1.student_id",
"ORDER",
"BY",
"AVG",
"(",
"monthly_rental",
")",
"DESC",
"LIMIT",
"1"
],
"query_toks_no_value": [
"select",
"t1",
".",
"student_id",
",",
"t2",
".",
"first_name",
"from",
"student_addresses",
"as",
"t1",
"join",
"students",
"as",
"t2",
"on",
"t1",
".",
"student_id",
"=",
"t2",
".",
"student_id",
"group",
"by",
"t1",
".",
"student_id",
"order",
"by",
"avg",
"(",
"monthly_rental",
")",
"desc",
"limit",
"value"
],
"question": "What are the id and first name of the student whose addresses have the highest average monthly rental?",
"question_toks": [
"What",
"are",
"the",
"id",
"and",
"first",
"name",
"of",
"the",
"student",
"whose",
"addresses",
"have",
"the",
"highest",
"average",
"monthly",
"rental",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
56,
false
],
null
],
[
0,
16,
false
],
null
]
],
"table_units": [
[
"table_unit",
9
],
[
"table_unit",
4
]
]
},
"groupBy": [
[
0,
56,
false
]
],
"having": [],
"intersect": null,
"limit": 1,
"orderBy": [
"desc",
[
[
0,
[
5,
60,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
56,
false
],
null
]
],
[
0,
[
0,
[
0,
18,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT T2.address_id , T1.city FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id GROUP BY T2.address_id ORDER BY AVG(monthly_rental) DESC LIMIT 1",
"query_toks": [
"SELECT",
"T2.address_id",
",",
"T1.city",
"FROM",
"Addresses",
"AS",
"T1",
"JOIN",
"Student_Addresses",
"AS",
"T2",
"ON",
"T1.address_id",
"=",
"T2.address_id",
"GROUP",
"BY",
"T2.address_id",
"ORDER",
"BY",
"AVG",
"(",
"monthly_rental",
")",
"DESC",
"LIMIT",
"1"
],
"query_toks_no_value": [
"select",
"t2",
".",
"address_id",
",",
"t1",
".",
"city",
"from",
"addresses",
"as",
"t1",
"join",
"student_addresses",
"as",
"t2",
"on",
"t1",
".",
"address_id",
"=",
"t2",
".",
"address_id",
"group",
"by",
"t2",
".",
"address_id",
"order",
"by",
"avg",
"(",
"monthly_rental",
")",
"desc",
"limit",
"value"
],
"question": "Find the id and city of the student address with the highest average monthly rental.",
"question_toks": [
"Find",
"the",
"id",
"and",
"city",
"of",
"the",
"student",
"address",
"with",
"the",
"highest",
"average",
"monthly",
"rental",
"."
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
7,
false
],
null
],
[
0,
57,
false
],
null
]
],
"table_units": [
[
"table_unit",
3
],
[
"table_unit",
9
]
]
},
"groupBy": [
[
0,
57,
false
]
],
"having": [],
"intersect": null,
"limit": 1,
"orderBy": [
"desc",
[
[
0,
[
5,
60,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
57,
false
],
null
]
],
[
0,
[
0,
[
0,
11,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT T1.incident_type_code , T2.incident_type_description FROM Behavior_Incident AS T1 JOIN Ref_Incident_Type AS T2 ON T1.incident_type_code = T2.incident_type_code GROUP BY T1.incident_type_code ORDER BY count(*) DESC LIMIT 1",
"query_toks": [
"SELECT",
"T1.incident_type_code",
",",
"T2.incident_type_description",
"FROM",
"Behavior_Incident",
"AS",
"T1",
"JOIN",
"Ref_Incident_Type",
"AS",
"T2",
"ON",
"T1.incident_type_code",
"=",
"T2.incident_type_code",
"GROUP",
"BY",
"T1.incident_type_code",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
],
"query_toks_no_value": [
"select",
"t1",
".",
"incident_type_code",
",",
"t2",
".",
"incident_type_description",
"from",
"behavior_incident",
"as",
"t1",
"join",
"ref_incident_type",
"as",
"t2",
"on",
"t1",
".",
"incident_type_code",
"=",
"t2",
".",
"incident_type_code",
"group",
"by",
"t1",
".",
"incident_type_code",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
],
"question": "What are the code and description of the most frequent behavior incident type?",
"question_toks": [
"What",
"are",
"the",
"code",
"and",
"description",
"of",
"the",
"most",
"frequent",
"behavior",
"incident",
"type",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
42,
false
],
null
],
[
0,
5,
false
],
null
]
],
"table_units": [
[
"table_unit",
7
],
[
"table_unit",
2
]
]
},
"groupBy": [
[
0,
42,
false
]
],
"having": [],
"intersect": null,
"limit": 1,
"orderBy": [
"desc",
[
[
0,
[
3,
0,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
42,
false
],
null
]
],
[
0,
[
0,
[
0,
6,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT T1.detention_type_code , T2.detention_type_description FROM Detention AS T1 JOIN Ref_Detention_Type AS T2 ON T1.detention_type_code = T2.detention_type_code GROUP BY T1.detention_type_code ORDER BY count(*) ASC LIMIT 1",
"query_toks": [
"SELECT",
"T1.detention_type_code",
",",
"T2.detention_type_description",
"FROM",
"Detention",
"AS",
"T1",
"JOIN",
"Ref_Detention_Type",
"AS",
"T2",
"ON",
"T1.detention_type_code",
"=",
"T2.detention_type_code",
"GROUP",
"BY",
"T1.detention_type_code",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"ASC",
"LIMIT",
"1"
],
"query_toks_no_value": [
"select",
"t1",
".",
"detention_type_code",
",",
"t2",
".",
"detention_type_description",
"from",
"detention",
"as",
"t1",
"join",
"ref_detention_type",
"as",
"t2",
"on",
"t1",
".",
"detention_type_code",
"=",
"t2",
".",
"detention_type_code",
"group",
"by",
"t1",
".",
"detention_type_code",
"order",
"by",
"count",
"(",
"*",
")",
"asc",
"limit",
"value"
],
"question": "What are the code and description of the least frequent detention type ?",
"question_toks": [
"What",
"are",
"the",
"code",
"and",
"description",
"of",
"the",
"least",
"frequent",
"detention",
"type",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
50,
false
],
null
],
[
0,
3,
false
],
null
]
],
"table_units": [
[
"table_unit",
8
],
[
"table_unit",
1
]
]
},
"groupBy": [
[
0,
50,
false
]
],
"having": [],
"intersect": null,
"limit": 1,
"orderBy": [
"asc",
[
[
0,
[
3,
0,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
50,
false
],
null
]
],
[
0,
[
0,
[
0,
4,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT T1.date_of_notes FROM Assessment_Notes AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.first_name = \"Fanny\"",
"query_toks": [
"SELECT",
"T1.date_of_notes",
"FROM",
"Assessment_Notes",
"AS",
"T1",
"JOIN",
"Students",
"AS",
"T2",
"ON",
"T1.student_id",
"=",
"T2.student_id",
"WHERE",
"T2.first_name",
"=",
"``",
"Fanny",
"''"
],
"query_toks_no_value": [
"select",
"t1",
".",
"date_of_notes",
"from",
"assessment_notes",
"as",
"t1",
"join",
"students",
"as",
"t2",
"on",
"t1",
".",
"student_id",
"=",
"t2",
".",
"student_id",
"where",
"t2",
".",
"first_name",
"=",
"value"
],
"question": "Find the dates of assessment notes for students with first name \"Fanny\".",
"question_toks": [
"Find",
"the",
"dates",
"of",
"assessment",
"notes",
"for",
"students",
"with",
"first",
"name",
"``",
"Fanny",
"''",
"."
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
36,
false
],
null
],
[
0,
16,
false
],
null
]
],
"table_units": [
[
"table_unit",
6
],
[
"table_unit",
4
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
38,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
18,
false
],
null
],
"\"Fanny\"",
null
]
]
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT T1.text_of_notes FROM Assessment_Notes AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id WHERE T2.last_name = \"Schuster\"",
"query_toks": [
"SELECT",
"T1.text_of_notes",
"FROM",
"Assessment_Notes",
"AS",
"T1",
"JOIN",
"Teachers",
"AS",
"T2",
"ON",
"T1.teacher_id",
"=",
"T2.teacher_id",
"WHERE",
"T2.last_name",
"=",
"``",
"Schuster",
"''"
],
"query_toks_no_value": [
"select",
"t1",
".",
"text_of_notes",
"from",
"assessment_notes",
"as",
"t1",
"join",
"teachers",
"as",
"t2",
"on",
"t1",
".",
"teacher_id",
"=",
"t2",
".",
"teacher_id",
"where",
"t2",
".",
"last_name",
"=",
"value"
],
"question": "Find the texts of assessment notes for teachers with last name \"Schuster\".",
"question_toks": [
"Find",
"the",
"texts",
"of",
"assessment",
"notes",
"for",
"teachers",
"with",
"last",
"name",
"``",
"Schuster",
"''",
"."
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
37,
false
],
null
],
[
0,
26,
false
],
null
]
],
"table_units": [
[
"table_unit",
6
],
[
"table_unit",
5
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
39,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
30,
false
],
null
],
"\"Schuster\"",
null
]
]
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT T1.date_incident_start , date_incident_end FROM Behavior_Incident AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.last_name = \"Fahey\"",
"query_toks": [
"SELECT",
"T1.date_incident_start",
",",
"date_incident_end",
"FROM",
"Behavior_Incident",
"AS",
"T1",
"JOIN",
"Students",
"AS",
"T2",
"ON",
"T1.student_id",
"=",
"T2.student_id",
"WHERE",
"T2.last_name",
"=",
"``",
"Fahey",
"''"
],
"query_toks_no_value": [
"select",
"t1",
".",
"date_incident_start",
",",
"date_incident_end",
"from",
"behavior_incident",
"as",
"t1",
"join",
"students",
"as",
"t2",
"on",
"t1",
".",
"student_id",
"=",
"t2",
".",
"student_id",
"where",
"t2",
".",
"last_name",
"=",
"value"
],
"question": "Find the start and end dates of behavior incidents of students with last name \"Fahey\".",
"question_toks": [
"Find",
"the",
"start",
"and",
"end",
"dates",
"of",
"behavior",
"incidents",
"of",
"students",
"with",
"last",
"name",
"``",
"Fahey",
"''",
"."
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
43,
false
],
null
],
[
0,
16,
false
],
null
]
],
"table_units": [
[
"table_unit",
7
],
[
"table_unit",
4
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
44,
false
],
null
]
],
[
0,
[
0,
[
0,
45,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
20,
false
],
null
],
"\"Fahey\"",
null
]
]
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT T1.datetime_detention_start , datetime_detention_end FROM Detention AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id WHERE T2.last_name = \"Schultz\"",
"query_toks": [
"SELECT",
"T1.datetime_detention_start",
",",
"datetime_detention_end",
"FROM",
"Detention",
"AS",
"T1",
"JOIN",
"Teachers",
"AS",
"T2",
"ON",
"T1.teacher_id",
"=",
"T2.teacher_id",
"WHERE",
"T2.last_name",
"=",
"``",
"Schultz",
"''"
],
"query_toks_no_value": [
"select",
"t1",
".",
"datetime_detention_start",
",",
"datetime_detention_end",
"from",
"detention",
"as",
"t1",
"join",
"teachers",
"as",
"t2",
"on",
"t1",
".",
"teacher_id",
"=",
"t2",
".",
"teacher_id",
"where",
"t2",
".",
"last_name",
"=",
"value"
],
"question": "Find the start and end dates of detentions of teachers with last name \"Schultz\".",
"question_toks": [
"Find",
"the",
"start",
"and",
"end",
"dates",
"of",
"detentions",
"of",
"teachers",
"with",
"last",
"name",
"``",
"Schultz",
"''",
"."
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
51,
false
],
null
],
[
0,
26,
false
],
null
]
],
"table_units": [
[
"table_unit",
8
],
[
"table_unit",
5
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
52,
false
],
null
]
],
[
0,
[
0,
[
0,
53,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
30,
false
],
null
],
"\"Schultz\"",
null
]
]
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT T2.address_id , T1.zip_postcode FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id ORDER BY monthly_rental DESC LIMIT 1",
"query_toks": [
"SELECT",
"T2.address_id",
",",
"T1.zip_postcode",
"FROM",
"Addresses",
"AS",
"T1",
"JOIN",
"Student_Addresses",
"AS",
"T2",
"ON",
"T1.address_id",
"=",
"T2.address_id",
"ORDER",
"BY",
"monthly_rental",
"DESC",
"LIMIT",
"1"
],
"query_toks_no_value": [
"select",
"t2",
".",
"address_id",
",",
"t1",
".",
"zip_postcode",
"from",
"addresses",
"as",
"t1",
"join",
"student_addresses",
"as",
"t2",
"on",
"t1",
".",
"address_id",
"=",
"t2",
".",
"address_id",
"order",
"by",
"monthly_rental",
"desc",
"limit",
"value"
],
"question": "What are the id and zip code of the address with the highest monthly rental?",
"question_toks": [
"What",
"are",
"the",
"id",
"and",
"zip",
"code",
"of",
"the",
"address",
"with",
"the",
"highest",
"monthly",
"rental",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
7,
false
],
null
],
[
0,
57,
false
],
null
]
],
"table_units": [
[
"table_unit",
3
],
[
"table_unit",
9
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": 1,
"orderBy": [
"desc",
[
[
0,
[
0,
60,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
57,
false
],
null
]
],
[
0,
[
0,
[
0,
12,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT T2.cell_mobile_number FROM Student_Addresses AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.monthly_rental ASC LIMIT 1",
"query_toks": [
"SELECT",
"T2.cell_mobile_number",
"FROM",
"Student_Addresses",
"AS",
"T1",
"JOIN",
"Students",
"AS",
"T2",
"ON",
"T1.student_id",
"=",
"T2.student_id",
"ORDER",
"BY",
"T1.monthly_rental",
"ASC",
"LIMIT",
"1"
],
"query_toks_no_value": [
"select",
"t2",
".",
"cell_mobile_number",
"from",
"student_addresses",
"as",
"t1",
"join",
"students",
"as",
"t2",
"on",
"t1",
".",
"student_id",
"=",
"t2",
".",
"student_id",
"order",
"by",
"t1",
".",
"monthly_rental",
"asc",
"limit",
"value"
],
"question": "What is the cell phone number of the student whose address has the lowest monthly rental?",
"question_toks": [
"What",
"is",
"the",
"cell",
"phone",
"number",
"of",
"the",
"student",
"whose",
"address",
"has",
"the",
"lowest",
"monthly",
"rental",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
56,
false
],
null
],
[
0,
16,
false
],
null
]
],
"table_units": [
[
"table_unit",
9
],
[
"table_unit",
4
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": 1,
"orderBy": [
"asc",
[
[
0,
[
0,
60,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
21,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT T2.monthly_rental FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id WHERE T1.state_province_county = \"Texas\"",
"query_toks": [
"SELECT",
"T2.monthly_rental",
"FROM",
"Addresses",
"AS",
"T1",
"JOIN",
"Student_Addresses",
"AS",
"T2",
"ON",
"T1.address_id",
"=",
"T2.address_id",
"WHERE",
"T1.state_province_county",
"=",
"``",
"Texas",
"''"
],
"query_toks_no_value": [
"select",
"t2",
".",
"monthly_rental",
"from",
"addresses",
"as",
"t1",
"join",
"student_addresses",
"as",
"t2",
"on",
"t1",
".",
"address_id",
"=",
"t2",
".",
"address_id",
"where",
"t1",
".",
"state_province_county",
"=",
"value"
],
"question": "What are the monthly rentals of student addresses in Texas state?",
"question_toks": [
"What",
"are",
"the",
"monthly",
"rentals",
"of",
"student",
"addresses",
"in",
"Texas",
"state",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
7,
false
],
null
],
[
0,
57,
false
],
null
]
],
"table_units": [
[
"table_unit",
3
],
[
"table_unit",
9
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
60,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
13,
false
],
null
],
"\"Texas\"",
null
]
]
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT T2.first_name , T2.last_name FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.address_id WHERE T1.state_province_county = \"Wisconsin\"",
"query_toks": [
"SELECT",
"T2.first_name",
",",
"T2.last_name",
"FROM",
"Addresses",
"AS",
"T1",
"JOIN",
"Students",
"AS",
"T2",
"ON",
"T1.address_id",
"=",
"T2.address_id",
"WHERE",
"T1.state_province_county",
"=",
"``",
"Wisconsin",
"''"
],
"query_toks_no_value": [
"select",
"t2",
".",
"first_name",
",",
"t2",
".",
"last_name",
"from",
"addresses",
"as",
"t1",
"join",
"students",
"as",
"t2",
"on",
"t1",
".",
"address_id",
"=",
"t2",
".",
"address_id",
"where",
"t1",
".",
"state_province_county",
"=",
"value"
],
"question": "What are the first names and last names of students with address in Wisconsin state?",
"question_toks": [
"What",
"are",
"the",
"first",
"names",
"and",
"last",
"names",
"of",
"students",
"with",
"address",
"in",
"Wisconsin",
"state",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
7,
false
],
null
],
[
0,
17,
false
],
null
]
],
"table_units": [
[
"table_unit",
3
],
[
"table_unit",
4
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
18,
false
],
null
]
],
[
0,
[
0,
[
0,
20,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
13,
false
],
null
],
"\"Wisconsin\"",
null
]
]
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT T1.line_1 , avg(T2.monthly_rental) FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id GROUP BY T2.address_id",
"query_toks": [
"SELECT",
"T1.line_1",
",",
"avg",
"(",
"T2.monthly_rental",
")",
"FROM",
"Addresses",
"AS",
"T1",
"JOIN",
"Student_Addresses",
"AS",
"T2",
"ON",
"T1.address_id",
"=",
"T2.address_id",
"GROUP",
"BY",
"T2.address_id"
],
"query_toks_no_value": [
"select",
"t1",
".",
"line_1",
",",
"avg",
"(",
"t2",
".",
"monthly_rental",
")",
"from",
"addresses",
"as",
"t1",
"join",
"student_addresses",
"as",
"t2",
"on",
"t1",
".",
"address_id",
"=",
"t2",
".",
"address_id",
"group",
"by",
"t2",
".",
"address_id"
],
"question": "What are the line 1 and average monthly rentals of all student addresses?",
"question_toks": [
"What",
"are",
"the",
"line",
"1",
"and",
"average",
"monthly",
"rentals",
"of",
"all",
"student",
"addresses",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
7,
false
],
null
],
[
0,
57,
false
],
null
]
],
"table_units": [
[
"table_unit",
3
],
[
"table_unit",
9
]
]
},
"groupBy": [
[
0,
57,
false
]
],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
8,
false
],
null
]
],
[
5,
[
0,
[
0,
60,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id = T2.address_id WHERE T2.first_name = \"Lyla\"",
"query_toks": [
"SELECT",
"T1.zip_postcode",
"FROM",
"Addresses",
"AS",
"T1",
"JOIN",
"Teachers",
"AS",
"T2",
"ON",
"T1.address_id",
"=",
"T2.address_id",
"WHERE",
"T2.first_name",
"=",
"``",
"Lyla",
"''"
],
"query_toks_no_value": [
"select",
"t1",
".",
"zip_postcode",
"from",
"addresses",
"as",
"t1",
"join",
"teachers",
"as",
"t2",
"on",
"t1",
".",
"address_id",
"=",
"t2",
".",
"address_id",
"where",
"t2",
".",
"first_name",
"=",
"value"
],
"question": "What is the zip code of the address where the teacher with first name \"Lyla\" lives?",
"question_toks": [
"What",
"is",
"the",
"zip",
"code",
"of",
"the",
"address",
"where",
"the",
"teacher",
"with",
"first",
"name",
"``",
"Lyla",
"''",
"lives",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
7,
false
],
null
],
[
0,
27,
false
],
null
]
],
"table_units": [
[
"table_unit",
3
],
[
"table_unit",
5
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
12,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
28,
false
],
null
],
"\"Lyla\"",
null
]
]
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT T2.email_address FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id = T2.address_id WHERE T1.zip_postcode = \"918\"",
"query_toks": [
"SELECT",
"T2.email_address",
"FROM",
"Addresses",
"AS",
"T1",
"JOIN",
"Teachers",
"AS",
"T2",
"ON",
"T1.address_id",
"=",
"T2.address_id",
"WHERE",
"T1.zip_postcode",
"=",
"``",
"918",
"''"
],
"query_toks_no_value": [
"select",
"t2",
".",
"email_address",
"from",
"addresses",
"as",
"t1",
"join",
"teachers",
"as",
"t2",
"on",
"t1",
".",
"address_id",
"=",
"t2",
".",
"address_id",
"where",
"t1",
".",
"zip_postcode",
"=",
"value"
],
"question": "What are the email addresses of teachers whose address has zip code \"918\"?",
"question_toks": [
"What",
"are",
"the",
"email",
"addresses",
"of",
"teachers",
"whose",
"address",
"has",
"zip",
"code",
"``",
"918",
"''",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
7,
false
],
null
],
[
0,
27,
false
],
null
]
],
"table_units": [
[
"table_unit",
3
],
[
"table_unit",
5
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
33,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
12,
false
],
null
],
"\"918\"",
null
]
]
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT count(*) FROM STUDENTS WHERE student_id NOT IN ( SELECT student_id FROM Behavior_Incident )",
"query_toks": [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"STUDENTS",
"WHERE",
"student_id",
"NOT",
"IN",
"(",
"SELECT",
"student_id",
"FROM",
"Behavior_Incident",
")"
],
"query_toks_no_value": [
"select",
"count",
"(",
"*",
")",
"from",
"students",
"where",
"student_id",
"not",
"in",
"(",
"select",
"student_id",
"from",
"behavior_incident",
")"
],
"question": "How many students are not involved in any behavior incident?",
"question_toks": [
"How",
"many",
"students",
"are",
"not",
"involved",
"in",
"any",
"behavior",
"incident",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
4
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
3,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": null,
"where": [
[
true,
8,
[
0,
[
0,
16,
false
],
null
],
{
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
7
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
43,
false
],
null
]
]
]
],
"union": null,
"where": []
},
null
]
]
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT last_name FROM Teachers EXCEPT SELECT T1.last_name FROM Teachers AS T1 JOIN Detention AS T2 ON T1.teacher_id = T2.teacher_id",
"query_toks": [
"SELECT",
"last_name",
"FROM",
"Teachers",
"EXCEPT",
"SELECT",
"T1.last_name",
"FROM",
"Teachers",
"AS",
"T1",
"JOIN",
"Detention",
"AS",
"T2",
"ON",
"T1.teacher_id",
"=",
"T2.teacher_id"
],
"query_toks_no_value": [
"select",
"last_name",
"from",
"teachers",
"except",
"select",
"t1",
".",
"last_name",
"from",
"teachers",
"as",
"t1",
"join",
"detention",
"as",
"t2",
"on",
"t1",
".",
"teacher_id",
"=",
"t2",
".",
"teacher_id"
],
"question": "Find the last names of teachers who are not involved in any detention.",
"question_toks": [
"Find",
"the",
"last",
"names",
"of",
"teachers",
"who",
"are",
"not",
"involved",
"in",
"any",
"detention",
"."
],
"sql": {
"except": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
26,
false
],
null
],
[
0,
51,
false
],
null
]
],
"table_units": [
[
"table_unit",
5
],
[
"table_unit",
8
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
30,
false
],
null
]
]
]
],
"union": null,
"where": []
},
"from": {
"conds": [],
"table_units": [
[
"table_unit",
5
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
30,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "behavior_monitoring",
"query": "SELECT T1.line_1 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.address_id INTERSECT SELECT T1.line_1 FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id = T2.address_id",
"query_toks": [
"SELECT",
"T1.line_1",
"FROM",
"Addresses",
"AS",
"T1",
"JOIN",
"Students",
"AS",
"T2",
"ON",
"T1.address_id",
"=",
"T2.address_id",
"INTERSECT",
"SELECT",
"T1.line_1",
"FROM",
"Addresses",
"AS",
"T1",
"JOIN",
"Teachers",
"AS",
"T2",
"ON",
"T1.address_id",
"=",
"T2.address_id"
],
"query_toks_no_value": [
"select",
"t1",
".",
"line_1",
"from",
"addresses",
"as",
"t1",
"join",
"students",
"as",
"t2",
"on",
"t1",
".",
"address_id",
"=",
"t2",
".",
"address_id",
"intersect",
"select",
"t1",
".",
"line_1",
"from",
"addresses",
"as",
"t1",
"join",
"teachers",
"as",
"t2",
"on",
"t1",
".",
"address_id",
"=",
"t2",
".",
"address_id"
],
"question": "What are the line 1 of addresses shared by some students and some teachers?",
"question_toks": [
"What",
"are",
"the",
"line",
"1",
"of",
"addresses",
"shared",
"by",
"some",
"students",
"and",
"some",
"teachers",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
7,
false
],
null
],
[
0,
27,
false
],
null
]
],
"table_units": [
[
"table_unit",
3
],
[
"table_unit",
4
]
]
},
"groupBy": [],
"having": [],
"intersect": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
7,
false
],
null
],
[
0,
27,
false
],
null
]
],
"table_units": [
[
"table_unit",
3
],
[
"table_unit",
5
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
8,
false
],
null
]
]
]
],
"union": null,
"where": []
},
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
8,
false
],
null
]
]
]
],
"union": null,
"where": []
}
}
]