glottolog / glottolog-legacy

DEPRECATED. See https://github.com/clld/glottolog
12 stars 11 forks source link

Re-assign child dialects of superseded lows1234 #35

Closed xflr6 closed 9 years ago

xflr6 commented 10 years ago
SELECT l.id, l.name, ll.level, array_agg(p.id ORDER BY t.depth) AS lineage
FROM language AS l JOIN languoid AS ll ON l.pk = ll.pk
JOIN treeclosuretable AS t ON t.child_pk = l.pk AND depth > 0
JOIN language AS p ON t.parent_pk = p.pk
JOIN languoid AS pp ON p.pk = pp.pk
WHERE l.active
GROUP BY l.pk, ll.pk
HAVING NOT bool_and(p.active) AND NOT 'bont1244' = ANY (array_agg(p.id))
ORDER BY l.id

    id    |       name        |  level  |  lineage
----------+-------------------+---------+------------
 bran1235 | Brandenburgish    | dialect | {lows1234}
 east2293 | East Pomeranian   | dialect | {lows1234}
 lowe1387 | Low East Prussian | dialect | {lows1234}
 meck1239 | Mecklenburgish    | dialect | {lows1234}
 west2358 | West Pomeranian   | dialect | {lows1234}

Somewhere under nort2627?

d97hah commented 10 years ago

Yes, correct, should go under nort2627!

2014-09-25 14:34 GMT+02:00 Sebastian Bank notifications@github.com:

SELECT l.id, l.name, ll.level, array_agg(p.id ORDER BY t.depth) AS lineageFROM language AS l JOIN languoid AS ll ON l.pk = ll.pkJOIN treeclosuretable AS t ON t.child_pk = l.pk AND depth > 0JOIN language AS p ON t.parent_pk = p.pkJOIN languoid AS pp ON p.pk = pp.pkWHERE l.activeGROUP BY l.pk, ll.pkHAVING NOT bool_and(p.active) AND NOT 'bont1244' = ANY (array_agg(p.id))ORDER BY l.id

id    |       name        |  level  |  lineage----------+-------------------+---------+------------

bran1235 | Brandenburgish | dialect | {lows1234} east2293 | East Pomeranian | dialect | {lows1234} lowe1387 | Low East Prussian | dialect | {lows1234} meck1239 | Mecklenburgish | dialect | {lows1234} west2358 | West Pomeranian | dialect | {lows1234}

Somewhere under nort2627 http://glottolog.org/resource/languoid/id/nort2627?

— Reply to this email directly or view it on GitHub https://github.com/clld/glottolog-data/issues/35.