PIM-1891 : move join and select of values and attributes to fetch data
query (the last one) and join only the expected attribute values