===========================
= id = model_id = property =
===========================
= 14 = 1 = 1 =
===========================
= 15 = 1 = 3 =
===========================
= 16 = 2 = 1 =
I have a table like above and I want to select model_ids only where property equals to 1 AND 3
I’d be glad if you could show me how
Sounds like you want this:
See SQL Fiddle with Demo
Or you can use the following:
See SQL Fiddle with Demo