I'm trying to get data from SQL database with SELECT
:
SELECT DISTINCT T2D.NO_ARTIKLU,
T2D.NAZEV_ARTIKLU,
T2D.DATUM,
T10.NO_PARTNERA
FROM D3000S.DIA2ZZ0D T2D, D3000S.DIA1ZZ00 T10, D3000S.DIA2ZZ00 T20
WHERE T10.NO_PARTNERA = T2D.NO_PARTNERA AND T2D.AKTIVITA > 0
The problem is -> There are most of duplicates that I want to filter with SELECT and I need to show only article with the latest datetime.
Thank you for the answers.