SELECT *
FROM (
select job AS qjob
, id AS qid
,ROW_NUMBER() OVER (PARTITION BY JOB ORDER BY ID DESC) AS RN
from sqbclog
)Sub
WHERE rn <= 2
This query will return last two records but if you only need the 2nd last record then in where clause use where en = 2 else leave it as it is.