I have mutiple columns and I want to create a dynamic query which can return column name and each of their distinct values. I want to do this in MySQl
So if I have only 2 columns:
- Gender which has Male and Female
- Purchase_Frequency with Low, Medium and High
In that case the output should be
Entity Unique_value
gender Male
gender Female
Purchase_Frequency Low
Purchase_Frequency Medium
Purchase_Frequency High
I found similar questions but didn't help me much
Return column name and distinct values
Return column names and count of their distinct values in MySQL