column_names: -1
*
0
id
0
name
0
grade
1
student id
1
friend id
2
student id
2
liked id
column_names_original: -1
*
0
ID
0
name
0
grade
1
student_id
1
friend_id
2
student_id
2
liked_id
column_types: text
number
text
number
number
number
number
number
db_id: network_1
table_names: high schooler
friend
likes
table_names_original: Highschooler
Friend
Likes

How many high schoolers are there?
SELECT count(*) FROM Highschooler

Count the number of high schoolers.
SELECT count(*) FROM Highschooler

Show the names and grades of each high schooler.
SELECT name ,  grade FROM Highschooler

What are the names and grades for each high schooler?
SELECT name ,  grade FROM Highschooler

Show all the grades of the high schoolers.
SELECT grade FROM Highschooler

What is the grade of each high schooler?
SELECT grade FROM Highschooler

What grade is Kyle in?
SELECT grade FROM Highschooler WHERE name  =  "Kyle"

Return the grade for the high schooler named Kyle.
SELECT grade FROM Highschooler WHERE name  =  "Kyle"

Show the names of all high schoolers in grade 10.
SELECT name FROM Highschooler WHERE grade  =  10

What are the names of all high schoolers in grade 10?
SELECT name FROM Highschooler WHERE grade  =  10

Show the ID of the high schooler named Kyle.
SELECT ID FROM Highschooler WHERE name  =  "Kyle"

What is Kyle's id?
SELECT ID FROM Highschooler WHERE name  =  "Kyle"

How many high schoolers are there in grade 9 or 10?
SELECT count(*) FROM Highschooler WHERE grade  =  9 OR grade  =  10

Count the number of high schoolers in grades 9 or 10.
SELECT count(*) FROM Highschooler WHERE grade  =  9 OR grade  =  10

Show the number of high schoolers for each grade.
SELECT grade ,  count(*) FROM Highschooler GROUP BY grade

How many high schoolers are in each grade?
SELECT grade ,  count(*) FROM Highschooler GROUP BY grade

Which grade has the most high schoolers?
SELECT grade FROM Highschooler GROUP BY grade ORDER BY count(*) DESC LIMIT 1

Return the grade that has the greatest number of high schoolers.
SELECT grade FROM Highschooler GROUP BY grade ORDER BY count(*) DESC LIMIT 1

Show me all grades that have at least 4 students.
SELECT grade FROM Highschooler GROUP BY grade HAVING count(*)  >=  4

Which grades have 4 or more high schoolers?
SELECT grade FROM Highschooler GROUP BY grade HAVING count(*)  >=  4

Show the student IDs and numbers of friends corresponding to each.
SELECT student_id ,  count(*) FROM Friend GROUP BY student_id

How many friends does each student have?
SELECT student_id ,  count(*) FROM Friend GROUP BY student_id

Show the names of high school students and their corresponding number of friends.
SELECT T2.name ,  count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id GROUP BY T1.student_id

What are the names of the high schoolers and how many friends does each have?
SELECT T2.name ,  count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id GROUP BY T1.student_id

What is the name of the high schooler who has the greatest number of friends?
SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1

Return the name of the high school student with the most friends.
SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1

Show the names of high schoolers who have at least 3 friends.
SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id GROUP BY T1.student_id HAVING count(*)  >=  3

What are the names of high schoolers who have 3 or more friends?
SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id GROUP BY T1.student_id HAVING count(*)  >=  3

Show the names of all of the high schooler Kyle's friends.
SELECT T3.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id JOIN Highschooler AS T3 ON T1.friend_id  =  T3.id WHERE T2.name  =  "Kyle"

Return the names of friends of the high school student Kyle.
SELECT T3.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id JOIN Highschooler AS T3 ON T1.friend_id  =  T3.id WHERE T2.name  =  "Kyle"

How many friends does the high school student Kyle have?
SELECT count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id WHERE T2.name  =  "Kyle"

Count the number of friends Kyle has.
SELECT count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id WHERE T2.name  =  "Kyle"

Show ids of all students who do not have any friends.
SELECT id FROM Highschooler EXCEPT SELECT student_id FROM Friend

What are the ids of high school students who do not have friends?
SELECT id FROM Highschooler EXCEPT SELECT student_id FROM Friend

Show names of all high school students who do not have any friends.
SELECT name FROM Highschooler EXCEPT SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id

What are the names of students who have no friends?
SELECT name FROM Highschooler EXCEPT SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id

Show the ids of high schoolers who have friends and are also liked by someone else.
SELECT student_id FROM Friend INTERSECT SELECT liked_id FROM Likes

What are the ids of students who both have friends and are liked?
SELECT student_id FROM Friend INTERSECT SELECT liked_id FROM Likes

Show name of all students who have some friends and also are liked by someone else.
SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id INTERSECT SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id  =  T2.id

What are the names of high schoolers who both have friends and are liked?
SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id INTERSECT SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id  =  T2.id

Count the number of likes for each student id.
SELECT student_id ,  count(*) FROM Likes GROUP BY student_id

How many likes correspond to each student id?
SELECT student_id ,  count(*) FROM Likes GROUP BY student_id

Show the names of high schoolers who have likes, and numbers of likes for each.
SELECT T2.name ,  count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id GROUP BY T1.student_id

What are the names of high schoolers who have likes, and how many likes does each have?
SELECT T2.name ,  count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id GROUP BY T1.student_id

What is the name of the high schooler who has the greatest number of likes?
SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1

Give the name of the student with the most likes.
SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1

Show the names of students who have at least 2 likes.
SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id GROUP BY T1.student_id HAVING count(*)  >=  2

What are the names of students who have 2 or more likes?
SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id GROUP BY T1.student_id HAVING count(*)  >=  2

Show the names of students who have a grade higher than 5 and have at least 2 friends.
SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id WHERE T2.grade  >  5 GROUP BY T1.student_id HAVING count(*)  >=  2

What are the names of high schoolers who have a grade of over 5 and have 2 or more friends?
SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id WHERE T2.grade  >  5 GROUP BY T1.student_id HAVING count(*)  >=  2

How many likes does Kyle have?
SELECT count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id WHERE T2.name  =  "Kyle"

Return the number of likes that the high schooler named Kyle has.
SELECT count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id WHERE T2.name  =  "Kyle"

Find the average grade of all students who have some friends.
SELECT avg(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id)

What is the average grade of students who have friends?
SELECT avg(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id)

Find the minimum grade of students who have no friends.
SELECT min(grade) FROM Highschooler WHERE id NOT IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id)

What is the lowest grade of students who do not have any friends?
SELECT min(grade) FROM Highschooler WHERE id NOT IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id)