How to query with filter classifications
In Postgres, I would aggregate the labels for each clothe into a JSONB array which can then be queried for &quot;contains all of this&quot; quite easily.
Something along the lines:
select *
from clothes c
  join (
     select cl.clothes_id,
            jsonb_agg(to_jsonb(l) - 'id') as class
     from clothes_labels cl
       join labels l on cl.label_id = l.id
     group by cl.clothes_id
  ) cl on cl.clothes_id = c.id
where class @&gt; '[{&quot;name&quot;: &quot;Blue&quot;, &quot;classification&quot;: &quot;color&quot;},{&quot;name&quot;: &quot;Aloha&quot;, &quot;classification&quot;: &quot;style&quot;}]'
   or class @&gt; '[{&quot;name&quot;: &quot;Knit&quot;, &quot;classification&quot;: &quot;style&quot;}]'
;

Online example

In general I would replace EAV models with a JSON approach these days as they tend to be easier to query and work with (again: assuming Postgres, in MySQL this can't be indexed efficiently)