I have been trying to get some specific but could not get it.

```
SELECT 
    idStyle, 
    idStyleDtl, 
    costPrice, 
    MAX(createDt) created, 
    idCustomer 
FROM INVOICE_DTL
GROUP BY 
    idStyle, idStyleDtl,costPrice, idCustomer
ORDER BY 
    idStyle, idCustomer

```

This is my query and

[![Result](https://i.stack.imgur.com/21BBG.png)](https://i.stack.imgur.com/21BBG.png)

This is the result.
What I expected though the highlighted part would be merged and show only one row with `created:2017-02-01 12:38:31.597` and `costPrice:11.50`(because it's the same row as `MAX(createDt)`) since they have same `idStyle`, `idStyleDtl`, and `idCustomer`. I thought `MAX(costPrice)` might be it but it just returned higher `costPrice` not the one in the same row as `MAX(createDt)`.

I want to get one entire row having `MAX(createDt)`result when there's same `idStyle`, `idStyleDtl`, and `idCustomer`.

Even small advice will be appreciated. Thanks!