I have a table called score that contains columns
How to choose which id_team is the top scorer per game
im trying with this but what a wrong result
SELECT MAX( score ) , id_team FROM scores GROUP BY `id_game` LIMIT 0 , 30
You can use the independent connection to find out the correct team identifier for the game with the maximum rating
SELECT s.* FROM scores s JOIN ( SELECT MAX(score) score, id_game FROM scores GROUP BY id_game ) ss USING(score ,id_game ) LIMIT 0 , 30
select A.id_game, A.id_team as winning_team from scores A, ( select max(score) as max, id_game from scores group by id_game )B where A.id_game = B.id_game and A.score = B.max
Source: https://habr.com/ru/post/1537332/More articles:Memory Allocation for Recursive Functions - c ++Why is Float.isNaN (Float.NaN) “false” on an old LG Android 2.3.7 phone? - androidПреобразование значения nvarchar '3001822585' переполняет колонку int - sqlwebrtc, is it possible to convert an image to a media stream? - javascriptAlign the author’s text in the last line of the quote, if there is a place, otherwise put it on a new line - androidОтправить файлы cookie с помощью ajax-вызова из содержимого расширения chrome script - google-chromeUsing Android Volley to request and reply Json as String - android-volleyWriting to a file using CsvHelper in C # - c #Sql query injection attack in php - mysqlHow to initialize error type in if-else - goAll Articles