Simplify product attributes query

With this change is possible to read attributes data with only 2 queries.