fix getlinkedidentifiers sql, order by confirmations