I want to know if its possible to get the functionality of group by with using it.
I need to find average without using group by.
basically I am looking for an alternative for the below simple query without using group by.
SELECT
AVG(salary)
, g.emp_id
FROM #emp e ,#salary d
WHERE e.emp_id=d.emp_id
GROUP BY e.emp_id
One option