0
I have the following code
SELECT t2.conta_nome as operacao, t1.provedor_nome as operadora, perfil, count(*) as total FROM asteriskcdrdb.cdr_tarifacao a INNER JOIN telefonia.provedor t1 ON a.operadora = t1.provedor_id INNER JOIN telefonia.conta t2 ON a.accountcode = t2.conta_id WHERE calldate >= Date_add(now(), interval -60 second) GROUP by operacao,operadora ORDER by operadora LIMIT 50 ;
That generates:
Operations | Operators
GFK OI | ALGAR
BMG BANK | EMBRATEL
IESDE | EMBRATEL
MONTREAL |EMBRATEL
RENAULT |EMBRATEL
BMG BANK |GVT
MONTREAL |GVT
I would like to know how to group all values related to COLUMN OPERATORS
Do you want to do this on the client side (Javascript/jQuery) right? or is it Nodejs? You can put HTML in question?
– Sergio
Question became clear but tried group_concat ? http://dev.mysql.com/doc/refman/5.1/en/group-by-functions.html#function_group-Concat
– Motta
added the result as image, I would like to group the data of the first column for the second without repeating, for example EMBRATEL would repeat a single time
– raddx
already tried group_concat but not sure it is not related to 2nda column
– raddx