I have a table that contains the following data:
- DATEURM IDV UNID
- 2013-02-02 15259 W0L0TGF0572
- 2013-02-02 15259 W0L0TGF0572
- 2013-02-02 15674 ZFA18503158
- 2013-02-02 16157 ZFA18503158
- 2013-02-02 16157 ZFA18503158
- ...
and i use this query to select data from it:
SELECT * FROM TBL order_date WHERE DATEURM BETWEEN DATE 'today'+10 AND DATE 'today'+40 order by DATEURM asc ROWS 50
What I would like is to not get duplicate rows of the UNID column and the result be something like:
- DATEURM IDV UNID
- 2013-02-02 15259 W0L0TGF0572
- 2013-02-02 16157 ZFA18503158
- ...
I played around with DISTINCT and GROUP BY but didn’t manage to get any good result after a few hours 🙁
From your comment, you say now you want one row per unid and you don’t mind which other values you get, so try this:
over the same data I get: