viernes, 7 de septiembre de 2012

Citation Mining 2.0

Sólo una breve nota antes de ir a dormir:

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 DESC
Colaboraciones 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.: