GroupBy on nodejs mysql

1

I do not know how to do the query, being more specific I do not know how to put the group by in my query, here goes my code

objBD.query('SELECT u.ID_U, u.nombre, t.ID_T,t.tiempo, t.iteracion from USUARIO u INNER JOIN TIEMPOS t ON u.ID_U=t.ID_U GROUP BY iteracion where u.ID_U=?',[i], function(err, rows, fields) { note: without the GROUP BY my query works well

    
asked by hubman 05.11.2016 в 19:39
source

1 answer

1

GROUP BY goes to the end of the query. Probably writing ...WHERE u.ID_U=? GROUP BY t.iteraciones

    
answered by 05.11.2016 / 19:56
source