Helllo I have the following table
ID_1 | Status | Event_Type | Insert_Mode | ID_2 |
---|---|---|---|---|
1 | V | M | G | 100 |
2 | V | K | I | 100 |
3 | V | M | G | 101 |
4 | V | L | I | 103 |
5 | V | M | G | 104 |
6 | V | L | I | 107 |
7 | V | L | I | 110 |
8 | V | M | G | 120 |
9 | V | K | I | 120 |
In the same sql query
- I want to select only the elements with Event type M from all the elements with same ID_2 which can be located in maximum 2 rows