A slight correction to Solution 1 - this query will get the 2nd activity if there are 2 or more activities for a user, OR the only activity if there is only one
SELECT A.*
from
(
SELECT a.username,activity, ROW_NUMBER() over(partition by a.username order by startdate desc) seq
,b.activities
FROM employee_Activity a
join (
SELECT username, COUNT(*) as activities from employee_Activity
group by USERNAME
) b on a.USERNAME = b.USERNAME
) AS A
WHERE A.seq=2 or A.activities = 1
I've used a sub-query here but you could use a CTE, a temporary table or a table variable if you prefer