Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- +--------+-------+------+--+
- | Object | Event | Time | |
- +--------+-------+------+--+
- | Obj1 | A | 1 | |
- | Obj1 | B | 3 | |
- | Obj2 | A | 7 | |
- | Obj2 | B | 4 | |
- +--------+-------+------+--+
- SELECT DISTINCT Object from
- (SELECT * from
- (SELECT * FROM table
- INNER JOIN (SELECT Object Obj FROM table WHERE event LIKE '%A%' AS temp_table
- ON table.Object=temp_table.Obj) AS temp_final WHERE event LIKE '%B%')
- AS temp2;
- Obj1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement