SELECT *
FROM tnrs
WHERE
"Name_submitted" = NULLIF(:schema.array_to_string(ARRAY[
    NULLIF("Accepted_name_family", 'Unknown')
    , "Accepted_name"
    , "Accepted_name_author"
], ' '), '')
ORDER BY "Name_submitted"
;

ALTER TABLE :table ADD PRIMARY KEY ("Name_submitted");
