Postgresql – How to transform and summarize row counts
This is my data with _temp_data as ( select unnest(ARRAY['A','B','A','A']) as hobbies_1 ,unnest(ARRAY['E','F','A','F']) as hobbies_2 ) select * from _temp_data Input data: hobbies_1|hobbies_2| ---------+---------+ A |E | B |F | A |A | A |F | I want to transform…