Alternate approach for 1
SELECT employeeid,employeename,salary,hiredate
(
SELECT DENSE_RANK() OVER (ORDER BY Salary DESC) AS Rnk,*
FROM table
)t
WHERE Rnk=2
modified solution for 2 to take care of cases where there are ties ie multiple years with same maximum employee count
SELECT TOP 1 WITH TIES datepart(yy, hire_date) Year, count(employee_id) cnt
FROM YourTable
GROUP BY datepart(yy, hire_date)
ORDER BY cnt DESC
------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/