This is a nested join. Most shops insist on brackets when doing this:SELECT DISTINCT s1.CAPEXFROM dbo.v_product_family_capx AS s1 RIGHT OUTER JOIN ( dbo.part_usage AS s2 INNER JOIN dbo.part AS s3 ON s2.part_id = s3.part_id ) ON s1.product_family = s3.product_family
As all the outer join can do is possibly add a NULL, I would be inclined to re-write as: SELECT DISTINCT --?? CAPEXFROM dbo.v_product_family_capxUNION ALLSELECT TOP 1 NULLFROM dbo.v_product_family_capx S1WHERE NOT EXISTS( SELECT 1 FROM dbo.part AS s3 WHERE s3.product_family = s1.product_family AND EXISTS ( SELECT 1 FROM dbo.part_usage AS s2 WHERE s2.part_id = s3.part_id ))