with name_prf as (

select

    a.*,

    row_number() over (partition by emplid, name_type order by effdt desc) rn

from

    ps_scc_names_qvw a)

select

    emplid,

    first_name

from

    name_prf

where

    rn = 1

    and name_type = ‘PRF’

    ;