0

Tennis Tournament what I am missing?

I wrote a query and according to the test, its bringing the results desired by not in the order test as expecting, the weird thing is that the expected result are not ordered at all. -- select players` names and the total points as Total SELECT player_name, SUM(set_1 + set_2 + set_3) as total FROM matches GROUP BY player_name

12th Sep 2023, 9:27 PM
PAULO SERGIO DA SILVA JUNIOR
14 odpowiedzi
+ 6
Check the description of the task again, read carefully and understand. Hints: • what are the query requirements & does it asks you to include "GROUP BY" clause for solving query? • Does the task ask you aggregating the total using "SUM()" function? • Your query asks to add total points aliasing it "AS Total."
13th Sep 2023, 4:00 AM
D Shah 🎯⏳️
D Shah 🎯⏳️ - avatar
+ 3
• It's conventional to make all SQL statements uppercased and from the comments it should be "Total" not "total" so correct thing is "AS Total". • Since you're talking about sorting here or ordering the right statement to use is "ORDER BY" not "GROUP BY" cause each player has a distinct name so you can't group them by names.
13th Sep 2023, 4:04 AM
Divine Darkey
Divine Darkey - avatar
+ 2
if someone completes this code and writes to me, thank you
15th Sep 2023, 9:45 AM
AMIR H R 👑💎🕹📱📡 💪
AMIR  H  R 👑💎🕹📱📡 💪 - avatar
+ 2
SELECT player_name, SUM(set_1, set_2, set_3) as total FROM matches ORDER BY player_name
22nd Sep 2023, 1:09 PM
Aditya Kumar
Aditya Kumar - avatar
+ 2
it doesn't give input I tried this before thanks my friend
22nd Sep 2023, 5:04 PM
AMIR H R 👑💎🕹📱📡 💪
AMIR  H  R 👑💎🕹📱📡 💪 - avatar
+ 2
SELECT player_name, set_1 + set_2 + set_3 AS total FROM matches
26th Sep 2023, 5:05 AM
Rakesh Pawar
Rakesh Pawar - avatar
+ 2
thanks don't working
12th Oct 2023, 7:13 PM
AMIR H R 👑💎🕹📱📡 💪
AMIR  H  R 👑💎🕹📱📡 💪 - avatar
+ 2
SELECT player_name , set_1 + set_2 + set_3 AS Total FROM matches this is the solution
28th Oct 2023, 6:18 PM
Nouran Tariq
Nouran Tariq - avatar
+ 2
hey guys Online Bookstore sql SELECT * FROM books WHERE author = 'Fiction' what's wrong
1st Nov 2023, 8:23 AM
AMIR H R 👑💎🕹📱📡 💪
AMIR  H  R 👑💎🕹📱📡 💪 - avatar
+ 1
If you look closely you will see the order of names in the table is the same as the result order, which suggest you don’t need to specific the ordering on the result. You are very close to pass the test, give it another try.
13th Sep 2023, 9:18 AM
Wong Hei Ming
Wong Hei Ming - avatar
+ 1
SELECT player_name, SUM(set_1 + set_2 + set_3) AS total FROM matches GROUP BY player_name; the order for the output is wrong i am not sure what is wrong player_name,total Sophia Davis,18 John Smith,19 Michael Johnson,16 Emily Thompson,20 Daniel Wilson,16 the actual output player_name,total John Smith,19 Michael Johnson,16 Emily Thompson,20 Daniel Wilson,16 Sophia Davis,18
14th Oct 2023, 9:50 AM
Brian Xian
Brian Xian - avatar
0
AMIR H R A<ヾ(@^▽^@)ノ >LION 💪 It is a different question. Please open a new post, or use the search function first.
1st Nov 2023, 8:42 AM
Wong Hei Ming
Wong Hei Ming - avatar
0
This is the correct code:- -- select players` names and the total points as Total SELECT player_name, CONCAT(set_1 + set_2 + set_3) as total FROM matches
14th Jan 2024, 11:01 PM
Mohammed Shabaz Khan
Mohammed Shabaz Khan - avatar
0
-- select players` names and the total points as Total Select player_name , (set_1+ set_2+set_3) as total FROM matches
31st Jan 2024, 9:38 AM
Mansoor Ahmed
Mansoor Ahmed - avatar