Questions

SQL Tasks

The below dataset contains information on the performance of a set of basketball players. At your disposal, you have player characteristics, in-game player performance data and game metadata. Assume any dates are in the “YYYY-MM-DD” forma

Use the following tables to answer the questions below:

image.png

Question 1: How would you write a SQL query to get the total points, rebounds, 
and assists by each player? Include the players name, country, and team_id.

Type your sql code here:

Question 2: Write a SQL query to get how many triple doubles each player has 
achieved (a triple double = a game with 10 or more points, 10 or more rebounds, 
and 10 or more assists) in descending order.

Type your sql code here:

Question 3: Write a SQL query to categorize players into three groups - 
'Low Scorer', 'Medium Scorer', and 'High Scorer'. The categorization is based 
on their average points per game: 'Low Scorer' if average points is less than 10,
'Medium Scorer' if average points is between 10 and 20, and 'High Scorer' 
if average points is more than 20. Please include the player's name and their 
category in your result.

Type your sql code here:

Question 4: Write a SQL query to get the player who averages the 3rd most points
 for each team in descending order

Type your sql code here: