I have only single table as shown below
| id | name | product |
|---|---|---|
| 1 | sai | m |
| 2 | sai | EBB |
| 3 | sri | m |
| 4 | ram | m |
| 5 | sita | EBB |
| 6 | siva | EBB |
please help me to write a SQL query to show only m , only ebb and both . only m
| id | name | product |
|---|---|---|
| 3 | sri | m |
| 4 | ram | m |
only ebb
| id | name | product |
|---|---|---|
| 5 | sita | EBB |
| 6 | siva | EBB |
intersect or both
| id | name | product |
|---|---|---|
| 1 | sai | m |
| 2 | sai | EBB |
i have tried using not except, joins but nothing worked for me.Please help me .