Hello,
I've a table on which I want to focus on 2 fields :
(id_user,id_event)
In fact, I store in this table events triggered by users while visiting a page.
So for example, my table can contain the following rows
(15,5)
(15,6)
(16,5)
etc
I want to select the id_user of users having triggered only 2 kinds of events. I want those couple of events to be 5,6 or 6,7 or 5,7 ; but I don't want to get the users having triggered the 3 events 5,6,7
First of all, I don't even know how to get the users having triggered 2 events among the list (5,6,7). The problem is, as id_event and id_user are stored in the same table, I don't know how to write the where clause to get users for whom there are 2 id_events. The only idea I've so far is to join the table with itself. But I think it will tend to be more complicated to get 2 events only among the list previously described
Thanks