Database: soccer_2

Question: How many students are enrolled in college?
SQL: SELECT sum(enr) FROM College

Question: How many students, on average, does each college have enrolled?
SQL: SELECT avg(enr) FROM College

Question: How many different colleges are there?
SQL: SELECT COUNT(*) FROM College

Question: How many different players trained for more than 1000 hours?
SQL: SELECT count(*) FROM Player WHERE HS  >  1000

Question: What is the number of colleges with a student population greater than 15000?
SQL: SELECT count(*) FROM College WHERE enr  >  15000

Question: How many hours do the players train on average?
SQL: SELECT avg(HS) FROM Player

Question: What are the names and number of hours spent training for each player who trains for less than 1500 hours?
SQL: SELECT pName ,  HS FROM Player WHERE HS  <  1500

Question: How many different colleges were represented at tryouts?
SQL: SELECT count(DISTINCT cName) FROM tryout

Question: What are the different types of player positions?
SQL: SELECT count(DISTINCT pPos) FROM tryout

Question: How many students received a yes from tryouts?
SQL: SELECT count(*) FROM tryout WHERE decision  =  'yes'

Question: What is the number of students playing as a goalie?
SQL: SELECT count(*) FROM tryout WHERE pPos  =  'goalie'

Question: What is the average, maximum, and minimum for the number of hours spent training?
SQL: SELECT avg(HS) ,  max(HS) ,  min(HS) FROM Player

Question: What is average number of students enrolled in Florida colleges?
SQL: SELECT avg(enr) FROM College WHERE state  =  'FL'

Question: What are the names of players who train between 500 and 1500 hours?
SQL: SELECT pName FROM Player WHERE HS BETWEEN 500 AND 1500

Question: Who are the players that have names containing the letter a?
SQL: SELECT DISTINCT pName FROM Player WHERE pName LIKE '%a%'

Question: What are the names and enrollment numbers for colleges that have more than 10000 enrolled and are located in Louisiana?
SQL: SELECT cName ,  enr FROM College WHERE enr  >  10000 AND state = "LA"

Question: What information do you have on colleges sorted by increasing enrollment numbers?
SQL: SELECT * FROM College ORDER BY enr

Question: What is the name of every college in alphabetical order that has more than 18000 students enrolled?
SQL: SELECT cName FROM College WHERE enr  >  18000 ORDER BY cName

Question: What are the name of the players who received a card in descending order of the hours of training?
SQL: SELECT pName FROM Player WHERE yCard  =  'yes' ORDER BY HS DESC

Question: What are the different names of the colleges involved in the tryout in alphabetical order?
SQL: SELECT DISTINCT cName FROM tryout ORDER BY cName

Question: What was the most popular position at tryouts?
SQL: SELECT pPos FROM tryout GROUP BY pPos ORDER BY count(*) DESC LIMIT 1

Question: How many students participated in tryouts for each college by descennding count?
SQL: SELECT count(*) ,  cName FROM tryout GROUP BY cName ORDER BY count(*) DESC

Question: For each position, what is the minimum time students spent practicing?
SQL: SELECT min(T2.HS) ,   T1.pPos FROM tryout AS T1 JOIN player AS T2 ON T1.pID  =  T2.pID GROUP BY T1.pPos