From row to column - crosstab

Hello!

I’ve got a table like this
image

and would like to create a crosstab with the following result:
image

Is this possible somehow? I’m working with postgresql.

Thank you!