Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select id, name, count(*) usercount from
- ((select project.id, project.name from project, user_project_priv where project.id= user_project_priv.project_id)
- union all
- (select id, name from project where id not in (select distinct project.id from user_project_priv, project where project.id=user_project_priv.project_id))) as fos
- group by id order by usercount
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement