How to flatten a PostgreSQL result
问题 I have experiments, features, and feature_values. Features have values in different experiments. So I have something like: Experiments: experiment_id, experiment_name Features: feature_id, feature_name Feature_values: experiment_id, feature_id, value Lets say, I have three experiments (exp1, exp2, exp3) and three features (feat1, feat2, feat3). I would like to have a SQL-result that looks like: feature_name | exp1 | exp2 | exp3 -------------+------+------+----- feat1 | 100 | 150 | 110 feat2 |