A
A
Alexander Sinitsyn2016-05-11 11:26:55
SQL
Alexander Sinitsyn, 2016-05-11 11:26:55

Is it possible to combine the values ​​of a string field through a delimiter in a group by sql query?

There is a query that collects data from three tables into four fields to add them to the fourth, but in the fourth three fields are key and a non-uniqueness error occurs. It is required to get one from several lines, in which unique keys will remain as they are, and in the fourth text field, the values ​​of all lines will be combined through a separator.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey, 2016-05-11
@a_u_sinitsin

well, you group by key fields, non-key - group_concat(t.field)

D
DarkMatter, 2016-05-11
@darkmatter

implode('|'...), json??

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question