can you please help with the question:
How do I transform a table in this format:
to this:
Thanks in advance!
CodePudding user response:
You can do:
select person, 'Salary' as metric, salary as metric_value from t
union all
select person, 'Spend', spend from t