[Schema (values) (types)]: | soccer_1 |  Player_Attributes : id (text) , player_fifa_api_id (number) , player_api_id (number) , date (number) , overall_rating (text) , potential (number) , preferred_foot (number) , attacking_work_rate (text) , defensive_work_rate (text) , crossing (text) , finishing (number) , heading_accuracy (number) , short_passing (number) , volleys (number) , dribbling (number) , curve (number) , free_kick_accuracy (number) , long_passing (number) , ball_control (number) , acceleration (number) , sprint_speed (number) , agility (number) , reactions (number) , balance (number) , shot_power (number) , jumping (number) , stamina (number) , strength (number) , long_shots (number) , aggression (number) , interceptions (number) , positioning (number) , vision (number) , penalties (number) , marking (number) , standing_tackle (number) , sliding_tackle (number) , gk_diving (number) , gk_handling (number) , gk_kicking (number) , gk_positioning (number) , gk_reflexes (number) | sqlite_sequence : name (text) , seq (number) | Player : id (text) , player_api_id (number) , player_name (number) , player_fifa_api_id (number) , birthday (text) , height (number) , weight (number) | League : id (text) , country_id (number) , name (number) | Country : id (text) , name (number) | Team : id (text) , team_api_id (number) , team_fifa_api_id (number) , team_long_name (number) , team_short_name (text) | Team_Attributes : id (text) , team_fifa_api_id (number) , team_api_id (number) , date (number) , buildupplayspeed (text) , buildupplayspeedclass (number) , buildupplaydribbling (number) , buildupplaydribblingclass (text) , buildupplaypassing (text) , buildupplaypassingclass (text) , buildupplaypositioningclass (number) , chancecreationpassing (number) , chancecreationpassingclass (number) , chancecreationcrossing (number) , chancecreationcrossingclass (number) , chancecreationshooting (number) , chancecreationshootingclass (number) , chancecreationpositioningclass (number) , defencepressure (number) , defencepressureclass (number) , defenceaggression (number) , defenceaggressionclass (number) , defenceteamwidth (number) , defenceteamwidthclass (number) , defencedefenderlineclass (number);
[Primary Keys]: player_attributes : id, sqlite_sequence : id, player : id, league : id, country : id, team : id
[Foreign Keys]: player_attributes : player_api_id = player : player_api_id | player_attributes : player_fifa_api_id = player : player_fifa_api_id | league : country_id = country : id | team_attributes : team_api_id = team : team_api_id | team_attributes : team_fifa_api_id = team : team_fifa_api_id

Question: List all country and league names.
SQL: SELECT T1.name ,  T2.name FROM Country AS T1 JOIN League AS T2 ON T1.id  =  T2.country_id

Question: How many leagues are there in England?
SQL: SELECT count(*) FROM Country AS T1 JOIN League AS T2 ON T1.id  =  T2.country_id WHERE T1.name  =  "England"

Question: What is the average weight of all players?
SQL: SELECT avg(weight) FROM Player

Question: What is the maximum and minimum height of all players?
SQL: SELECT max(weight) ,  min(weight) FROM Player

Question: List all player names who have an overall rating higher than the average.
SQL: SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.overall_rating  >  ( SELECT avg(overall_rating) FROM Player_Attributes )

Question: What are the names of players who have the best dribbling?
SQL: SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.dribbling  =  ( SELECT max(overall_rating) FROM Player_Attributes)

Question: List the names of all players who have a crossing score higher than 90 and prefer their right foot.
SQL: SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.crossing  >  90 AND T2.preferred_foot  =  "right"

Question: List the names of all left-footed players who have overall rating between 85 and 90.
SQL: SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.preferred_foot  =  "left" AND T2.overall_rating  >=  85 AND T2.overall_rating  <=  90

Question: What is the average rating for right-footed players and left-footed players?
SQL: SELECT preferred_foot ,  avg(overall_rating) FROM Player_Attributes GROUP BY preferred_foot

Question: Of all players with an overall rating greater than 80, how many are right-footed and left-footed?
SQL: SELECT preferred_foot ,  count(*) FROM Player_Attributes WHERE overall_rating  >  80 GROUP BY preferred_foot

Question: List all of the player ids with a height of at least 180cm and an overall rating higher than 85.
SQL: SELECT player_api_id FROM Player WHERE height  >=  180 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE overall_rating  >  85

Question: List all of the ids for left-footed players with a height between 180cm and 190cm.
SQL: SELECT player_api_id FROM Player WHERE height  >=  180 AND height  <=  190 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE preferred_foot  =  "left"

Question: Who are the top 3 players in terms of overall rating?
SQL: SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id  =  T2.player_api_id ORDER BY overall_rating DESC LIMIT 3

Question: List the names and birthdays of the top five players in terms of potential.
SQL: SELECT DISTINCT T1.player_name ,  T1.birthday FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id  =  T2.player_api_id ORDER BY potential DESC LIMIT 5