Querying All Records of All Users who have any instance of purchase behavior in their history
It's common practice to write this sort of query using an exists construct, something like:

select *
from users join credit_purchases using (user_id)
where purchase_type = 'A'
and exists (
    select 'x'
    from credit_purchases
    where purchase_type = 'B'
    and user_id = users.user_id
);


Be careful that this type of query only works properly if you're looking for different records in the sub-query; if it is at all possible to "hit" the same record, you need to exclude that in the subquery's where clause, by doing something like:

select *
from users join credit_purchases cp using (user_id)
where purchase_type = 'A'
and exists (
    select 'x'
    from credit_purchases
    where purchase_type = 'A'
    and user_id = users.user_id
    and credit_purchase_id &lt;&gt; cp.credit_purchase_id
);


I'm assuming your tables have surrogate keys with the obvious names.