i need your help for a pgsql request. i have in my db 2 tables: squads(name) and account(account_name, score, squad_name). what i would like to do is to list all squad and for each squad, to get the score of each account. So i have same number of column than accounts. How can i do that ? knowing that accounts and squads can change often so it must be dynamic.
here is a result i would like to have: query result
EDIT
as asked, here is a simple model of my db(i just have more evaluation types like email etc...). my model
for exemple i do lots of evaluations of calls that employees take. an evaluation belongs to a squad and to an account. i join tables by the names of squad and account. now i need to see the score of the evaluation(per squad and per account as described in the first picture). idealy columns are the accounts
Thank you