What is a valid way to write this query?
I need to order the column customer by DocNum descending and get the top 25 without any duplicate.
SELECT DISTINCT TOP 25 customer
FROM tt
WHERE DocNum LIKE '%_%' AND UPPER(U_NAME) NOT LIKE '%E G%'
ORDER BY DocNum DESC
1条答案
按热度按时间5f0d552i1#
works thanks to Martin Smith