I need help making the following query:
From the permissions table, obtain the user's row without losing data from the action and value column.
Greetings,.
Dear, the selection would be like this:
select usuario, modulo, accion as accion1, valor,
(select a.accion from test.permisos a where a.usuario=t.usuario limit 1,1 ) as accion2 ,
(select b.valor from test.permisos b where b.usuario=t.usuario limit 1,1 ) as valor2
from test.permisos t group by usuario
create a table: