0

Tennis Tournament In SQP

SELECT player_name, SUM(set_1 + set_2 + set_3) AS total FROM matches GROUP BY player_name ORDER BY total Whar's goes wrong in my code ? Thanks

25th Sep 2023, 8:22 AM
Vitor Frango
Vitor Frango - avatar
2 Answers
+ 3
1. The expected output doesn't seem to be in any order, why use OTHER BY? 2. Do you really need SUM() function to make calculation across different field? Review slide 2 in Data Types sub-module, and compare the difference how they make calculation than yours.
25th Sep 2023, 9:23 AM
Wong Hei Ming
Wong Hei Ming - avatar
0
Thank you Wong Hei Ming
25th Sep 2023, 8:42 PM
Vitor Frango
Vitor Frango - avatar