I have a table and I am trying to get the first person in the table with gender = 'M' and the first person with gender = 'F'
First person in this case = ORDER BY name in alphabetical order
name | gender | .......other data
A M
B M
C F
D F
E
F M
G F
How do I get a result table with the first instance of 'M' , 'F' without the null/empty column?
Ideal result:
name | gender | ........other data
A M
C F
Thanks for the help!