I'm trying to create an SQL user defined aggregate function that can display a specific row from a table that i can use in a group by query when i want to display additional data .
Assuming that i have a table called Employees which has ID , Salary , Name , Gender when i want to display the lowest salary in both genders accompanied by their names
Select min(Salary) , Function_name(name) from Employees group by Gender
the thing is I want to try doing this without using a subquery is that possible at all ?