Answer the question
In order to leave comments, you need to log in
SQL query for everyone - everything?
TABLE sport(Name TEXT, Surname TEXT, Num TEXT, Vid TEXT, Mark REAL, Shtraf REAL) First name, last name, number, sport, points, penalties. How for each pair of first name, last name to display all sports where he took part?
Answer the question
In order to leave comments, you need to log in
Basically, this is solved by one of the two group functions below, depending on which DBMS you are working on. The methods of use are detailed in the documentation and on the Internet, including in Russian.
T-SQL: string_agg function
https://docs.microsoft.com/en-us/sql/t-sql/functio...
PL/SQL: listagg function
https://docs.oracle.com/cd/E11882_01/ server.112/e4... Of
course, you can invent your own bike, but why?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question