'Unique Address SQL Query [duplicate]
Solution 1:[1]
Only the account no and override matter (for the purpose of the calculation). here is a link to the sql fiddle: http://sqlfiddle.com/#!18/b2bb8/1/0
select
account
,street
,city
,zip
,override
from (
select
*
, [filter] = max(override) over(partition by account)
from t1
) as t2
where override = filter
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |