I'm trying to achive an hard try in google sheet.

Let's start from what I right now, the A structure in the image.

What I would like to achieve using functions like =QUERY, is the B or C (whatever is fine for me) structore.

[![Exemple](https://i.stack.imgur.com/FxF58.png)](https://i.stack.imgur.com/FxF58.png)

Can u help me with the sintax?

I appreciate it so much and thank you very much

Luco

I tried a couplo of function but can't get to the point using QUERY function, maybe I'm using bad syntax.