• In fact you don't need the WHERE clause:

    SELECT D.a, A.a, A.b

    FROM D

    LEFT OUTER JOIN A

    ON A.a = D.a And A.b=1

    ...but you've fixed it. Anyway - there are a few ideas there...