Database: sports_competition

Question: What are the maximum and minimum number of silver medals for clubs.
SQL: SELECT max(Silver) ,  min(Silver) FROM club_rank

Question: Show the names of clubs that have players with position "Right Wing".
SQL: SELECT T1.name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID WHERE T2.Position  =  "Right Wing"

Question: What is the average points of players from club with name "AIB".
SQL: SELECT avg(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID WHERE T1.name  =  "AIB"

Question: List the position of players with average number of points scored by players of that position bigger than 20.
SQL: SELECT POSITION FROM player GROUP BY name HAVING avg(Points)  >=  20

Question: List the most common type of competition.
SQL: SELECT Competition_type FROM competition GROUP BY Competition_type ORDER BY COUNT(*) DESC LIMIT 1

Question: List the types of competition that have at most five competitions of that type.
SQL: SELECT Competition_type FROM competition GROUP BY Competition_type HAVING COUNT(*)  <=  5

Question: List the names of clubs that do not have any players.
SQL: SELECT name FROM CLub WHERE Club_ID NOT IN (SELECT Club_ID FROM player)

Question: What are the positions with both players having more than 20 points and less than 10 points.
SQL: SELECT POSITION FROM player WHERE Points  >  20 INTERSECT SELECT POSITION FROM player WHERE Points  <  10

Question: what are the name of players who get more than the average points.
SQL: SELECT name FROM player WHERE points  >  (SELECT avg(points) FROM player)

Question: find the number of players whose points are lower than 30 in each position.
SQL: SELECT count(*) ,  POSITION FROM player WHERE points  <  30 GROUP BY POSITION

Question: which country did participated in the most number of Tournament competitions?
SQL: SELECT country FROM competition WHERE competition_type  =  'Tournament' GROUP BY country ORDER BY count(*) DESC LIMIT 1

Question: which countries did participated in both Friendly and Tournament type competitions.
SQL: SELECT country FROM competition WHERE competition_type  =  'Friendly' INTERSECT SELECT country FROM competition WHERE competition_type  =  'Tournament'