I have a problem. I have big data table with 300+ users (as `garazas_id`) for every user I have multiple rows created over the past 3 years. I will order it by `garazas_id` and will see only record with latest id for every row (or with latest date it will be the same result).

This is my SQL code:

```
SELECT id = MAX(id), garazas_id, sk_rad, datums 
FROM `elektr_apmaks`
GROUP BY garazas_id 
ORDER BY garazas_id + 0;

```

Order is ok, but results in each row is with the earlier id.