This is my table structure.
I want to compare the column property_id by the column label_id.
Table: label_master
id | label_id | property_id | property_value |
---|---|---|---|
1 | 1 | 1 | 10 |
2 | 1 | 2 | 15 |
3 | 2 | 1 | 20 |
4 | 2 | 2 | 25 |
5 | 3 | 1 | 5 |
6 | 3 | 2 | 10 |
I want to apply the condition like
where (property_id = 1 and property_value >= 10) and (property_id = 2 and property_value >= 15)
I want to check both property_id's property_value of same label.
My expected out is
id | label_id | property_id | property_value |
---|---|---|---|
1 | 1 | 1 | 10 |
2 | 1 | 2 | 15 |
3 | 2 | 1 | 20 |
4 | 2 | 2 | 25 |