 <p>You could use the <code>row_number</code> function to partition by Name and Parent, like:</p> <pre><code>select * from ( select row_number() over (partition by Name, Parent order by Name, Parent) as rn , * from YourTable ) sub where rn = 1 -- Only first row for a name/parent combination </code></pre> <p>If you're looking to select only rows that are unique, in the sense that no other rows with the same name and parent exist, try:</p> <pre><code>select * from YourTable a where ( select count(*) from YourTable b where a.Name = b.Name and a.Parent = b.Parent ) = 1 </code></pre>