oaregithub / oare_sql

1 stars 0 forks source link

text_epigraphy regions that do not have a text markup type of "broken" or "isSealImpression" #62

Closed Gertrudius closed 5 months ago

Gertrudius commented 5 months ago

We have 113 instances of regions that are not taking the expected types, so I will be going through them to confirm that they are indeed not supposed to have a "broken" or "isSealImpression" entry.

SELECT t.display_name, te.uuid AS te_uuid, tm.uuid AS tm_uuid, te.text_uuid, te.`type` AS te_type,tm.`type` AS tm_type, te.object_on_tablet FROM text_epigraphy AS te
LEFT JOIN text_markup AS tm
    ON te.uuid = tm.reference_uuid
LEFT JOIN `text` AS t
ON te.text_uuid = t.uuid
WHERE te.`type` = "region"
AND te.uuid NOT IN (SELECT reference_uuid FROM text_markup WHERE type IN ("broken","isSealImpression"))
Gertrudius commented 5 months ago

The "ruling" type in this result set needs to be filtered out, I did a survey of them and all those I checked seemed to be legitimate.

EDIT: same is true of uninscribed;

SELECT t.display_name, te.uuid AS te_uuid, tm.uuid AS tm_uuid, te.text_uuid, te.`type` AS te_type,tm.`type` AS tm_type, te.object_on_tablet FROM text_epigraphy AS te
LEFT JOIN text_markup AS tm
    ON te.uuid = tm.reference_uuid
LEFT JOIN `text` AS t
ON te.text_uuid = t.uuid
WHERE te.`type` = "region"
AND te.uuid NOT IN (SELECT reference_uuid FROM text_markup WHERE type IN ("broken","isSealImpression","ruling","uninscribed"))
GROUP BY tm.reference_uuid;
Gertrudius commented 5 months ago

These have all been fixed.