Using SQL I have the following table
| ID | FirstName | TradeAmount |
==============================================
| 1022 | Dale | 2196 |
----------------------------------------------
| 1022 | Dale | 95000 |
----------------------------------------------
| 1022 | Dale | 97196 |
----------------------------------------------
| 1069 | Anna | 13 |
----------------------------------------------
| 1069 | Anna | 39 |
----------------------------------------------
| 1069 | Anna | 53 |
----------------------------------------------
| 1069 | Anna | 14999 |
----------------------------------------------
| 1069 | Anna | 250000 |
----------------------------------------------
| 1069 | Anna | 264999 |
----------------------------------------------
| 1069 | Tilly | 302 |
----------------------------------------------
| 1069 | Tilly | 303 |
----------------------------------------------
| 1069 | Tilly | 120000 |
----------------------------------------------
| 1069 | Tilly | 120302 |
----------------------------------------------
| 1069 | Tilly | 120605 |
----------------------------------------------
I would to execute a Distinct on ID column, and I want to only return the first value from the ID column regardless of the TradeAmount value.
So, I would like help with query that would return the following from the above table:
| ID | FirstName | TradeAmount |
==============================================
| 1022 | Dale | 2196 |
| 1069 | Anna | 13 |
| 1069 | Tilly | 302 |
----------------------------------------------
Of course regular DISTINCT on the ID column wouldn’t work for this question.