Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

get many value to 1 column sql

select a.id_a
      , a.description
      , coalesce( group_concat(distinct concat(b.description, '[', c.quantity, ']') order by b.id_b separator ', ')
                , '') 
from a
left join c on a.id_a = c.idex_a
left join b on b.id_b = c.idex_b
group by a.id_a
       , a.description
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #column #sql
ADD COMMENT
Topic
Name
2+1 =