TABLE sport(Name TEXT, Surname TEXT, Num TEXT, Vid TEXT, Mark REAL, Shtraf REAL) 

Name, surname, number, sport, points, fines.

How for each pair name and surname to bring all sports where he participated?

  • Why tags of different DBMS? - Alexander Petrov
  • @AlexanderPetrov + - syntax looks like someone can help)) - Daniel Sadovskiy

1 answer 1

It is not quite clear from the question in what form the result should be displayed, but if, for example, all the values ​​are in one field, then it can be something like this (MySQL)

 SELECT `Name`, `Surname`, GROUP_CONCAT(`Vid`) FROM `sport` GROUP BY `Name`, `Surname`