I have an index 'analytics', which contains a list of events ( for eg: CRUD) that occured over a period of time. I am looking to find a set of records that were added and deleted by primary key.
id, key, event, timestamp
where key is primary key of record, event is 'create', 'read', 'delete', 'update'.
I want to find the list of primary keys that were both 'created' and 'deleted'. Basically an intersection of two sets ('created') and ('deleted') over the primary key.
I can't seem to get ahead with this.