Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- id_archivo id_p
- 1 1
- 1 2
- 2 2
- 2 3
- 1 3
- 3 2
- 3 4
- 4 1
- 4 2
- 4 3
- select id_archivo, count(id_p) as p from archivoscompartidos where id_p=2 and id_archivo in (select id_archivo from archivoscompartidos where id_p=3) group by id_archivo having count(id_p)<3;
- id_archivo p
- 1 1
- 2 1
- 4 1
- select id_archivo, count(id_p) as p from archivoscompartidos where id_p=2 and
- id_archivo in (select id_archivo from archivoscompartidos where
- id_p=3)
- group by id_p having count(id_p);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement