Select VP_TOTALS.APPLYDATE As Dates, VP_TOTALS.LABORLEVELNAME2 As [Desc 1],
VP_TOTALS.LABORLEVELNAME3 As [Desc 2], VP_TOTALS.TIMEINSECONDS / 3600 As Hours,
CASE
WHEN VP_TOTALS.PAYCODENAME = 'Regular' THEN VP_TOTALS.WAGEAMOUNT ELSE 0 end As Wages,
case WHEN VP_TOTALS.PAYCODENAME = 'Overtime' THEN VP_TOTALS.WAGEAMOUNT ELSE 0 end As Overtime,
case WHEN VP_TOTALS.PAYCODENAME = 'Holwrkd' THEN VP_TOTALS.WAGEAMOUNT ELSE 0 end As Holwrkd
From VP_TOTALS
Order By VP_TOTALS.APPLYDATE