Company: Bree_7oct
Difficulty: medium
Problem Description In a baseball tournament, each player's score is recorded. Within each team, the player who scored the maximum runs is considered the team leader . Players in the team who scored greater than or equal to 50% of the team leader's score (including the leader themselves) are categorized as the average players of the team. For example, if a team leader scored 101 runs, any player on that team with a score of 50.5 or more is considered an average player. Write a SQL query to find the count of average players for each team. Sort the final output alphabetically by the team name (A-Z). Schema Table: p_score Column Name Type Description p_id int Represents the unique ID of the player t_id int Represents the ID of the player's team score int Represents the score of the player Table: t_details Column Name Type Description t_id int Represents the unique ID of the team t_name varchar Represents the name of the team Required Output The result should only include teams present in