• Like this?

    SELECT * FROM D

    LEFT JOIN (SELECT *

    FROM

    A

    WHERE

    A.b = 1

    ) AS A

    ON D.a = A.B

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe