Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Select unique records

$
0
0

I have a query that returns the results I want, but I need to get just unique records, but still return 25 records after dedupe.

SELECT TOP 25 [StartTime], [EndTime], [CallerURI], [CallerIPAddr], [CallerSubnet], [CalleeURI], [CalleeIPAddr], [CalleeSubnet], [GatewayMSPair] FROM [QoEMetrics].[dbo].[QoEReportsCallDetailView] WHERE [QoEMetrics].[dbo].[QoEReportsCallDetailView].[GatewayMSPair] IS NOT NULL ORDER BY [StartTime] DESC

What's the best way to dedupe but still get the right number of records?

I'm not a SQL guy, so speak slowly and use small words.  :-)


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>