• It could be with something like this:

    CREATE TABLE numerator(

    memberid int,

    measureid int

    );

    INSERT INTO numerator

    VALUES

    (1,501),

    (1,502),

    (1,503),

    (2,501),

    (2,502),

    (3,501),

    (3,501),

    (3,501),

    (3,501),

    (4,501),

    (4,502),

    (4,503),

    (4,504),

    (4,505);

    SELECT memberid,

    measureid

    FROM numerator

    WHERE memberid IN (

    SELECT memberid

    FROM numerator

    GROUP BY memberid

    HAVING COUNT( DISTINCT CASE WHEN measureid IN( 501, 502, 503) THEN measureid END)= 3);

    GO

    DROP TABLE numerator;

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2