I have a table with three columns: taxon_id, scientific_name_element_id, and parent_id. I want to find the elements that are children
Assuming the parent_id column is NULL (meaning no value is set)
To select all scientific_name_element_id that have no value for parent_id (meaning parent_id is NULL)
You do this:
SELECT scientific_name_element_id
FROM YOUR_TABLE
WHERE parent_id IS NULL
This will get you a list of scientific_name_element_id that have no parents.