Colaboraciones entre países:
SELECT ctys, COUNT(ctys) AS count FROM (SELECT seq, ARRAY_AGG(cty) AS ctys FROM (SELECT DISTINCT seq::int,isi_cty(value) AS cty FROM isiunam WHERE field='C1' ORDER BY seq,cty) AS foo GROUP BY seq) AS bar GROUP BY ctys ORDER BY count DESCColaboraciones entre ogranizaciones:
SELECT orgs, COUNT(orgs) AS count FROM (SELECT seq, ARRAY_AGG(org) AS orgs FROM (SELECT DISTINCT seq::int,isi_org(value) AS org FROM isiunam WHERE field='C1' ORDER BY seq,org) AS foo GROUP BY seq) AS bar GROUP BY orgs ORDER BY count DESC* Falta la tabla SINORG de sinónimos de organizaciones
No hay comentarios.:
Publicar un comentario