Final answer:
To calculate the percentage of matches tied using a case statement inside AVG, you can use a SQL query with case statements and logical operators.
Step-by-step explanation:
To calculate the percentage of matches tied using a case statement inside AVG, you can use the following logic:
- For 'Ties 2013', use the case statement with the logical operator '=' to count the number of matches tied in 2013 and alias it as 'Ties 2013'.
- Similarly, for 'Ties 2014', use the case statement with the logical operator '=' to count the number of matches tied in 2014 and alias it as 'Ties 2014'.
- For 'Ties 2014-2015', use the case statement with the logical operator '=' to count the number of matches tied between 2014 and 2015 and alias it as 'Ties 2014-2015'.
Once you have the counts for each category, you can divide them by the total number of matches played in each respective period and multiply by 100 to get the percentage of matches tied in each year.