I have written a SQL query to display results, the below is the query
SELECT TRANSACTION_ID, INVOICE_NO, MOBILE_NO, ITEM_AMOUT
FROM INVOICE_DAILY_DTS
WHERE DAILY_DTS != 200 AND INVOICE_SAM = 12;
When I am executing the above query, I am getting the below results
1) 11331133114, 154245, 077123456789, 579.5
2) 11331133114, 154245, 077123456789, 579.5
3) 11331133114, 154246, 077457852155, 780.4
4) 11331133114, 154245, 077123456789, 579.5
5) 11331133114, 154458, 077547822554, 900.0
6) 11331133114, 154245, 077123456789, 579.5
7) 11331133114, 154246, 077457852155, 780.4
If you see the above results table has multiple rows of data in the INVOICE_NO column, I suggest getting ignore 2,4,6 & 7th rows when executing the query. Simple if the INVOICE_NO is duplicated only needs to get the first row of the result and ignore other results.
I am expecting the results are below, where it has ignored or excepted the results and showing the first row only of each INVOCIE_NO
1) 11331133114, 154245, 077123456789, 579.5
2) 11331133114, 154246, 077457852155, 780.4
3) 11331133114, 154458, 077547822554, 900.0