Errors in Data:
Some (63) children differ in first name part from parent. Sometimes this is simply a wrong whitepace, but more often it is a misspelling:
SELECT syn.id, synParent.tu_name parentEpi, synParent.tu_displayname parentDisplay, trim(replace(replace(replace(left (syn.tu_displayname, len(syn.tu_displayname)- len(syn.tu_name)), ' var.', ''), ' f.', ''), ' subsp.', '')) shorted,
syn.tu_name synName, syn.tu_rank synRank, syn.tu_displayname synDisplay, syn.tu_unacceptreason, right(syn.tu_sp, 30) synTree, syn.tu_parent synParent, syn.tu_status synStatus
FROM tu syn
INNER JOIN tu synParent ON synParent.id = syn.tu_parent
WHERE syn.tu_rank >= 220 AND synParent.tu_displayname <> trim(replace(replace(replace(left (syn.tu_displayname, len(syn.tu_displayname)- len(syn.tu_name)), ' var.', ''), ' f.', ''), ' subsp.', ''))
Subgenus seems not to have this problem and for genus and above it is not relevant anyway:
SELECT syn.id, synParent.tu_name parentEpi, synParent.tu_displayname parentDisplay, trim(left (replace(replace(syn.tu_displayname, ' (', ''), ')', ''), len(syn.tu_displayname)- len(syn.tu_name)-3)) shorted,
syn.tu_name childName, syn.tu_rank childRank, syn.tu_displayname childDisplay, syn.tu_unacceptreason, right(syn.tu_sp, 30) synTree, syn.tu_parent childParent, syn.tu_status childStatus
FROM tu syn
INNER JOIN tu synParent ON synParent.id = syn.tu_parent
WHERE syn.tu_rank <220 AND syn.tu_rank >180 AND synParent.tu_displayname <> trim(left (replace(replace(syn.tu_displayname, ' (', ''), ')', ''), len(syn.tu_displayname)- len(syn.tu_name)-3))
- there is one case, where a nomen nudum is the accepted taxon for an other taxon
SELECT acc.tu_status, acc.tu_displayname acc, syn.tu_acctaxon, syn.id , syn.tu_displayname syn
FROM tu acc INNER JOIN
tu AS syn ON acc.id = syn.tu_acctaxon
WHERE (acc.tu_status = 3) AND syn.tu_acctaxon <> syn.id
- there are 3317 cases where the tu_acctaxon has not a status "accepted" (2213 are self-referencing, 1104 are really different records, none of the "accepted" link again to another record, though there seem to be such records in WORMS, e.g. http://marinespecies.org/aphia.php?p=taxdetails&id=210439)
SELECT acc.id, acc.tu_status AS accStatus, acc.tu_displayname AS accName,
syn.id, syn.tu_status AS synStatus, syn.tu_displayname AS synName
FROM tu acc INNER JOIN
tu AS syn ON acc.id = syn.tu_acctaxon
WHERE (acc.tu_status <> 1) -- AND syn.id = acc.id -- AND acc.id <> acc.tu_acctaxon
ORDER BY accStatus, synStatus
289 cases where parent taxon is not accepted => probably not critical assuming that the parent child relationship is not a taxonomical one
610 taxa being alternative names but accepted taxon has not status accepted. Especially critical for both having status 5 (alternative name)
SELECT acc.id, acc.tu_status AS accStatus, acc.tu_displayname AS accName,
syn.id, syn.tu_status AS synStatus, syn.tu_displayname AS synName
FROM tu acc INNER JOIN
tu AS syn ON acc.id = syn.tu_acctaxon
WHERE (acc.tu_status <> 1) AND (syn.tu_status IN (1,5,9,10)) AND syn.id <> acc.id -- AND acc.id <> acc.tu_acctaxon
ORDER BY accStatus, synStatus