Skip to main content
se añadieron 26 caracteres en el cuerpo
Origen Enlace

Intenta con esta queryutilizando subconsultas, aquí un ejemplo:

select count(*) as cant_proyectos, (
 select count(*) as cant_usuarios from project_user where id_project = pu.id
),
(
 select count(*) as cant_issues from issue i inner join project p on i.id_project = 
 p.id where i.status = '' and p.id = pu.id
) from project_user pu where id_user = 1 group by (pu.id)

Intenta con esta query:

select count(*) as cant_proyectos, (
 select count(*) as cant_usuarios from project_user where id_project = pu.id
),
(
 select count(*) as cant_issues from issue i inner join project p on i.id_project = 
 p.id where i.status = '' and p.id = pu.id
) from project_user pu where id_user = 1 group by (pu.id)

Intenta utilizando subconsultas, aquí un ejemplo:

select count(*) as cant_proyectos, (
 select count(*) as cant_usuarios from project_user where id_project = pu.id
),
(
 select count(*) as cant_issues from issue i inner join project p on i.id_project = 
 p.id where i.status = '' and p.id = pu.id
) from project_user pu where id_user = 1 group by (pu.id)
Origen Enlace

Intenta con esta query:

select count(*) as cant_proyectos, (
 select count(*) as cant_usuarios from project_user where id_project = pu.id
),
(
 select count(*) as cant_issues from issue i inner join project p on i.id_project = 
 p.id where i.status = '' and p.id = pu.id
) from project_user pu where id_user = 1 group by (pu.id)