I need to select all columns from `dpgift` where `donor_id` is unique. I know how to get unique `donor_id` records from `dpgift` using:

```
SELECT distinct dpgift.donor_id from dpgift join dp on dp.donor_id = dpgift.donor_id

```

(I am joining the `dp` table to get more column fields).
Now how do I get all the columns for each unique `donor_id` by the last `gift_date`?

Expected output (there are 100+ actual columns):

```
0 => [
"donor_id" => "3838"
"gift_date" => "5/11/2018"
"amount" => "20"
"total" => "0"
"bill" => "0"
"balance" => "0"
"created_date" => "5/31/2017"
],
1 => [
"donor_id" => "3839"
"gift_date" => "12/11/2019"
"amount" => "155"
"total" => "120"
"bill" => "0"
"balance" => "0"
"created_date" => "1/8/2018"
]

```

Current output:

```
0 => [
"donor_id" => "3838"
"gift_date" => "4/6/2017"
"amount" => "5"
"total" => "0"
"bill" => "0"
"balance" => "0"
"created_date" => "5/31/2017"
],
1 => [
"donor_id" => "3838"
"gift_date" => "5/11/2018"
"amount" => "20"
"total" => "0"
"bill" => "0"
"balance" => "0"
"created_date" => "5/31/2017"
]

```