database_id
stringlengths
4
31
query
stringlengths
22
577
question
stringlengths
19
224
dorm_1
SELECT count(*) , avg(age) , city_code FROM student GROUP BY city_code
Find the number and average age of students living in each city.
dorm_1
SELECT count(*) , avg(age) , city_code FROM student WHERE sex = 'M' GROUP BY city_code
Find the average age and number of male students (with sex M) from each city.
dorm_1
SELECT count(*) , city_code FROM student GROUP BY city_code HAVING count(*) > 1
Find the number of students for the cities where have more than one student.
dorm_1
SELECT fname , lname FROM student WHERE major != (SELECT major FROM student GROUP BY major ORDER BY count(*) DESC LIMIT 1)
Find the first and last name of students who are not in the largest major.
dorm_1
SELECT count(*) , sex FROM student WHERE age > (SELECT avg(age) FROM student) GROUP BY sex
Find the number of students whose age is older than the average age for each gender.
dorm_1
SELECT avg(T1.age) , T3.dorm_name FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid GROUP BY T3.dorm_name
Find the average age of students living in each dorm and the name of dorm.
dorm_1
SELECT count(*) , T1.dormid FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid WHERE T1.student_capacity > 100 GROUP BY T1.dormid
Find the number of amenities for each of the dorms that can accommodate more than 100 students.
dorm_1
SELECT count(*) , T3.dorm_name FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T1.age > 20 GROUP BY T3.dorm_name
Find the number of students who is older than 20 in each dorm.
dorm_1
SELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall'
Find the first name of students who are living in the Smith Hall.
dorm_1
SELECT avg(T1.age) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.student_capacity = (SELECT max(student_capacity) FROM dorm)
Find the average age of students who are living in the dorm with the largest capacity.
dorm_1
SELECT count(*) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.gender = 'M'
Find the total number of students living in the male dorm (with gender M).
dorm_1
SELECT count(*) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall' AND T1.sex = 'F'
Find the number of female students (with F sex) living in Smith Hall
dorm_1
SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T1.dorm_name = 'Smith Hall'
Find the name of amenities Smith Hall dorm have.
dorm_1
SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T1.dorm_name = 'Smith Hall' ORDER BY T3.amenity_name
Find the name of amenities Smith Hall dorm have. ordered the results by amenity names.
dorm_1
SELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T1.amenid = T2.amenid GROUP BY T2.amenid ORDER BY count(*) DESC LIMIT 1
Find the name of amenity that is the most common in all dorms.
dorm_1
SELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid IN (SELECT T2.dormid FROM dorm AS T3 JOIN has_amenity AS T4 ON T3.dormid = T4.dormid JOIN dorm_amenity AS T5 ON T4.amenid = T5.amenid GROUP BY T3.dormid ORDER BY count(*) DESC LIMIT 1)
Find the first name of students who are living in the dorm that has most number of amenities.
dorm_1
SELECT T1.dorm_name , T1.student_capacity FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid GROUP BY T2.dormid ORDER BY count(*) LIMIT 1
Find the name and capacity of the dorm with least number of amenities.
dorm_1
SELECT dorm_name FROM dorm EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge'
Find the name of dorms that do not have amenity TV Lounge.
dorm_1
SELECT T1.fname , T1.lname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid IN (SELECT T3.dormid FROM has_amenity AS T3 JOIN dorm_amenity AS T4 ON T3.amenid = T4.amenid WHERE T4.amenity_name = 'TV Lounge')
Find the first and last name of students who are living in the dorms that have amenity TV Lounge.
dorm_1
SELECT T1.fname , T1.age FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid NOT IN (SELECT T3.dormid FROM has_amenity AS T3 JOIN dorm_amenity AS T4 ON T3.amenid = T4.amenid WHERE T4.amenity_name = 'TV Lounge')
Find the first name and age of students who are living in the dorms that do not have amenity TV Lounge.
cre_Doc_Control_Systems
SELECT document_status_code FROM Ref_Document_Status;
What document status codes do we have?
cre_Doc_Control_Systems
SELECT document_status_description FROM Ref_Document_Status WHERE document_status_code = "working";
What is the description of document status code 'working'?
cre_Doc_Control_Systems
SELECT document_type_code FROM Ref_Document_Types;
What document type codes do we have?
cre_Doc_Control_Systems
SELECT document_type_description FROM Ref_Document_Types WHERE document_type_code = "Paper";
What is the description of document type 'Paper'?
cre_Doc_Control_Systems
SELECT shipping_agent_name FROM Ref_Shipping_Agents;
What are the shipping agent names?
cre_Doc_Control_Systems
SELECT shipping_agent_code FROM Ref_Shipping_Agents WHERE shipping_agent_name = "UPS";
What is the shipping agent code of shipping agent UPS?
cre_Doc_Control_Systems
SELECT role_code FROM ROLES;
What are all role codes?
cre_Doc_Control_Systems
SELECT role_description FROM ROLES WHERE role_code = "ED";
What is the description of role code ED?
cre_Doc_Control_Systems
SELECT count(*) FROM Employees;
How many employees do we have?
cre_Doc_Control_Systems
SELECT T1.role_description FROM ROLES AS T1 JOIN Employees AS T2 ON T1.role_code = T2.role_code WHERE T2.employee_name = "Koby";
What is the role of the employee named Koby?
cre_Doc_Control_Systems
SELECT document_id , receipt_date FROM Documents;
List all document ids and receipt dates of documents.
cre_Doc_Control_Systems
SELECT T1.role_description , T2.role_code , count(*) FROM ROLES AS T1 JOIN Employees AS T2 ON T1.role_code = T2.role_code GROUP BY T2.role_code;
How many employees does each role have? List role description, id and number of employees.
cre_Doc_Control_Systems
SELECT Roles.role_description , count(Employees.employee_id) FROM ROLES JOIN Employees ON Employees.role_code = Roles.role_code GROUP BY Employees.role_code HAVING count(Employees.employee_id) > 1;
List roles that have more than one employee. List the role description and number of employees.
cre_Doc_Control_Systems
SELECT Ref_Document_Status.document_status_description FROM Ref_Document_Status JOIN Documents ON Documents.document_status_code = Ref_Document_Status.document_status_code WHERE Documents.document_id = 1;
What is the document status description of the document with id 1?
cre_Doc_Control_Systems
SELECT count(*) FROM Documents WHERE document_status_code = "done";
How many documents have the status code done?
cre_Doc_Control_Systems
SELECT document_type_code FROM Documents WHERE document_id = 2;
List the document type code for the document with the id 2.
cre_Doc_Control_Systems
SELECT document_id FROM Documents WHERE document_status_code = "done" AND document_type_code = "Paper";
List the document ids for any documents with the status code done and the type code paper.
cre_Doc_Control_Systems
SELECT Ref_Shipping_Agents.shipping_agent_name FROM Ref_Shipping_Agents JOIN Documents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Documents.document_id = 2;
What is the name of the shipping agent of the document with id 2?
cre_Doc_Control_Systems
SELECT count(*) FROM Ref_Shipping_Agents JOIN Documents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Ref_Shipping_Agents.shipping_agent_name = "USPS";
How many documents were shipped by USPS?
cre_Doc_Control_Systems
SELECT Ref_Shipping_Agents.shipping_agent_name , count(Documents.document_id) FROM Ref_Shipping_Agents JOIN Documents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code GROUP BY Ref_Shipping_Agents.shipping_agent_code ORDER BY count(Documents.document_id) DESC LIMIT 1;
Which shipping agent shipped the most documents? List the shipping agent name and the number of documents.
cre_Doc_Control_Systems
SELECT receipt_date FROM Documents WHERE document_id = 3;
What is the receipt date of the document with id 3?
cre_Doc_Control_Systems
SELECT Addresses.address_details FROM Addresses JOIN Documents_Mailed ON Documents_Mailed.mailed_to_address_id = Addresses.address_id WHERE document_id = 4;
What address was the document with id 4 mailed to?
cre_Doc_Control_Systems
SELECT mailing_date FROM Documents_Mailed WHERE document_id = 7;
What is the mail date of the document with id 7?
cre_Doc_Control_Systems
SELECT document_id FROM Documents WHERE document_status_code = "done" AND document_type_code = "Paper" EXCEPT SELECT document_id FROM Documents JOIN Ref_Shipping_Agents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Ref_Shipping_Agents.shipping_agent_name = "USPS";
List the document ids of documents with the status done and type Paper, which not shipped by the shipping agent named USPS.
cre_Doc_Control_Systems
SELECT document_id FROM Documents WHERE document_status_code = "done" AND document_type_code = "Paper" INTERSECT SELECT document_id FROM Documents JOIN Ref_Shipping_Agents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Ref_Shipping_Agents.shipping_agent_name = "USPS";
List document id of documents status is done and document type is Paper and the document is shipped by shipping agent named USPS.
cre_Doc_Control_Systems
SELECT draft_details FROM Document_Drafts WHERE document_id = 7;
What is draft detail of the document with id 7?
cre_Doc_Control_Systems
SELECT count(*) FROM Draft_Copies WHERE document_id = 2;
How many draft copies does the document with id 2 have?
cre_Doc_Control_Systems
SELECT document_id , count(copy_number) FROM Draft_Copies GROUP BY document_id ORDER BY count(copy_number) DESC LIMIT 1;
Which document has the most draft copies? List its document id and number of draft copies.
cre_Doc_Control_Systems
SELECT document_id , count(*) FROM Draft_Copies GROUP BY document_id HAVING count(*) > 1;
Which documents have more than 1 draft copies? List document id and number of draft copies.
cre_Doc_Control_Systems
SELECT Employees.employee_name FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id WHERE Circulation_History.document_id = 1;
List all employees in the circulation history of the document with id 1. List the employee's name.
cre_Doc_Control_Systems
SELECT employee_name FROM Employees EXCEPT SELECT Employees.employee_name FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id
List the employees who have not showed up in any circulation history of documents. List the employee's name.
cre_Doc_Control_Systems
SELECT Employees.employee_name , count(*) FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id GROUP BY Circulation_History.document_id , Circulation_History.draft_number , Circulation_History.copy_number ORDER BY count(*) DESC LIMIT 1;
Which employee has showed up in most circulation history documents. List the employee's name and the number of drafts and copies.
customers_and_products_contacts
SELECT count(*) FROM addresses WHERE country = 'USA'
How many addresses are there in country USA?
customers_and_products_contacts
SELECT DISTINCT city FROM addresses
Show all distinct cities in the address record.
customers_and_products_contacts
SELECT state_province_county , count(*) FROM addresses GROUP BY state_province_county
Show each state and the number of addresses in each state.
customers_and_products_contacts
SELECT customer_name , customer_phone FROM customers WHERE customer_id NOT IN (SELECT customer_id FROM customer_address_history)
Show names and phones of customers who do not have address information.
customers_and_products_contacts
SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1
Show the name of the customer who has the most orders.
customers_and_products_contacts
SELECT product_type_code FROM products GROUP BY product_type_code HAVING count(*) >= 2
Show the product type codes which have at least two products.
customers_and_products_contacts
SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'Completed' INTERSECT SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'Part'
Show the names of customers who have both an order in completed status and an order in part status.
customers_and_products_contacts
SELECT customer_name , customer_phone , payment_method_code FROM customers ORDER BY customer_number DESC
Show the name, phone, and payment method code for all customers in descending order of customer number.
customers_and_products_contacts
SELECT T1.product_name , sum(T2.order_quantity) FROM products AS T1 JOIN order_items AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_id
Show the product name and total order quantity for each product.
customers_and_products_contacts
SELECT min(product_price) , max(product_price) , avg(product_price) FROM products
Show the minimum, maximum, average price for all products.
customers_and_products_contacts
SELECT count(*) FROM products WHERE product_price > (SELECT avg(product_price) FROM products)
How many products have a price higher than the average?
customers_and_products_contacts
SELECT T2.customer_name , T3.city , T1.date_from , T1.date_to FROM customer_address_history AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id JOIN addresses AS T3 ON T1.address_id = T3.address_id
Show the customer name, customer address city, date from, and date to for each customer address history.
customers_and_products_contacts
SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.payment_method_code = 'Credit Card' GROUP BY T1.customer_id HAVING count(*) > 2
Show the names of customers who use Credit Card payment method and have more than 2 orders.
customers_and_products_contacts
SELECT T1.customer_name , T1.customer_phone FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T3.order_id = T2.order_id GROUP BY T1.customer_id ORDER BY sum(T3.order_quantity) DESC LIMIT 1
What are the name and phone of the customer with the most ordered product quantity?
student_1
SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 5
Find the last names of the teachers that teach fifth grade.
student_1
SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 1
Find the first names of the teachers that teach first grade.
student_1
SELECT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "OTHA" AND T2.lastname = "MOYER"
Find all students taught by OTHA MOYER. Output the first and last names of the students.
student_1
SELECT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "MARROTTE" AND T2.lastname = "KIRK"
Find all students taught by MARROTTE KIRK. Output first and last names of students.
student_1
SELECT T2.firstname , T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = "EVELINA" AND T1.lastname = "BROMLEY"
Find the first and last name of all the teachers that teach EVELINA BROMLEY.
student_1
SELECT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = "GELL" AND T1.lastname = "TAMI"
Find the last names of all the teachers that teach GELL TAMI.
student_1
SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "LORIA" AND T2.lastname = "ONDERSMA"
How many students does LORIA ONDERSMA teaches?
student_1
SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "KAWA" AND T2.lastname = "GORDON"
How many students does KAWA GORDON teaches?
student_1
SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "TARRING" AND T2.lastname = "LEIA"
Find the number of students taught by TARRING LEIA.
student_1
SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = "CHRISSY" AND T1.lastname = "NABOZNY"
How many teachers does the student named CHRISSY NABOZNY have?
student_1
SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = "MADLOCK" AND T1.lastname = "RAY"
How many teachers does the student named MADLOCK RAY have?
student_1
SELECT DISTINCT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 1 EXCEPT SELECT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "OTHA" AND T2.lastname = "MOYER"
Find all first-grade students who are NOT taught by OTHA MOYER. Report their first and last names.
student_1
SELECT DISTINCT T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 3 AND T2.firstname != "COVIN" AND T2.lastname != "JEROME"
Find the last names of the students in third grade that are not taught by COVIN JEROME.
student_1
SELECT grade , count(DISTINCT classroom) , count(*) FROM list GROUP BY grade
For each grade, report the grade, the number of classrooms in which it is taught and the total number of students in the grade.
student_1
SELECT classroom FROM list GROUP BY classroom ORDER BY count(*) DESC LIMIT 1
Which classroom has the most students?
student_1
SELECT classroom , count(*) FROM list WHERE grade = "0" GROUP BY classroom
For each grade 0 classroom, report the total number of students.
student_1
SELECT classroom , count(*) FROM list WHERE grade = "4" GROUP BY classroom
Report the total number of students for each fourth-grade classroom.
voter_2
SELECT max(Age) , min(Age) FROM STUDENT WHERE Major = 600
What are the maximum and minimum age of students with major 600?
voter_2
SELECT DISTINCT T1.Age FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Secretary_Vote WHERE T2.Election_Cycle = "Fall"
Find the distinct ages of students who have secretary votes in the fall election cycle.
voter_2
SELECT DISTINCT T1.Advisor FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote WHERE T2.Election_Cycle = "Spring"
Find the distinct Advisor of students who have treasurer votes in the spring election cycle.
voter_2
SELECT DISTINCT T1.Fname , T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.President_VOTE WHERE T1.sex = "F"
Find the first and last names of all the female (sex is F) students who have president votes.
voter_2
SELECT DISTINCT T1.Fname , T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_President_VOTE WHERE T1.age = 18
Find the first and last name of all the students of age 18 who have vice president votes.
voter_2
SELECT count(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = Class_Senator_Vote WHERE T1.Sex = "M" AND T2.Election_Cycle = "Fall"
How many male (sex is M) students have class senator votes in the fall election cycle?
voter_2
SELECT count(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = Class_Senator_Vote WHERE T1.city_code = "NYC" AND T2.Election_Cycle = "Spring"
Find the number of students whose city code is NYC and who have class senator votes in the spring election cycle.
voter_2
SELECT avg(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote WHERE T1.city_code = "NYC" AND T2.Election_Cycle = "Spring"
Find the average age of students who live in the city with code "NYC" and have secretary votes in the spring election cycle.
voter_2
SELECT avg(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote WHERE T1.Sex = "F" AND T2.Election_Cycle = "Spring"
Find the average age of female (sex is F) students who have secretary votes in the spring election cycle.
voter_2
SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_PRESIDENT_Vote EXCEPT SELECT DISTINCT Fname FROM STUDENT WHERE city_code = "PIT"
Find the distinct first names of all the students who have vice president votes and whose city code is not PIT.
voter_2
SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = PRESIDENT_Vote EXCEPT SELECT DISTINCT LName FROM STUDENT WHERE Advisor = "2192"
Find the distinct last names of all the students who have president votes and whose advisor is not 2192.
voter_2
SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = PRESIDENT_Vote INTERSECT SELECT DISTINCT LName FROM STUDENT WHERE Advisor = "8741"
Find the distinct last names of all the students who have president votes and whose advisor is 8741.
voter_2
SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2
Report all advisors that advise more than 2 students.
voter_2
SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*) < 3
Report all majors that have less than 3 students.
voter_2
SELECT Major FROM STUDENT GROUP BY major ORDER BY count(*) DESC LIMIT 1
Which major has the most students?
voter_2
SELECT Major FROM STUDENT WHERE Sex = "F" GROUP BY major ORDER BY count(*) DESC LIMIT 1
What is the most common major among female (sex is F) students?
voter_2
SELECT city_code FROM STUDENT GROUP BY city_code ORDER BY count(*) DESC LIMIT 1
What is the city_code of the city that the most students live in?