MYSQL: Select rows with identical values in one column, and specific values in another
SELECT b.*
    FROM (
        SELECT customer_id
            FROM tbl
            WHERE COUNT(*) = COUNT(DISTINCT STORE_id) -- no dup store_ids
            GROUP BY customer_id      -- per customer
            HAVING MIN(status_id) &gt; 4 -- all status_id &gt; 4
         ) AS a
    JOIN tbl AS b            -- go back to get other columns
        USING(customer_id);