<code postgresql fetch_nn.sql>
SELECT type, count(*) c
FROM europarl2.token
LEFT JOIN europarl2.type_list USING (type_id)
LEFT JOIN europarl2.paragraph USING (paragraph_id)
LEFT JOIN europarl2.text USING (text_id)
WHERE pos_id =
(
        SELECT pos_id
        FROM europarl2.pos_list
        WHERE tag = 'NN'
)
AND language_id = 1550
GROUP BY type
ORDER BY c DESC
</code>