SQL Server : can't find the right 'join' formula for what I want <p>I'm trying to find the right way to achieve this. Suppose I have 3 tables A, B and C.</p> <p>I want my request to show some info from all 3 tables, but I want to show only one line by records that are in A.</p> <p>The problem, if I join tables, is that there is most of the time a lot of B records linked to one A record, even worse, there is a lot of C linked to one B, so sometimes, the same A record is shown over a hundred times...</p> <p>I tried <code>select top(1)</code> for B and <code>top(1)</code> again for C but still, it returns <code>top(1)</code> written on every 100 row of the same A, tried left join... inner join...</p> <p>I'm trying to figure out how to group by but still can't find the right grouping. I ended up making A LOT of nested select, in fact, my query contains more nested select then anything else... it works but it takes forever...</p> <ol> <li><p>Would it be faster if I find a way to remove most of my nested select ?</p></li> <li><p>Is that even possible? I mean, did someone ever manage to accomplish this one line for all 'A' records query?</p></li> </ol>