Fixing error in duplicate column name

This was in the tmp select stmnt.