I have a categories table with the fields "id", "category_id", "name" where "category_id" is the id of the parent category. My requirement is that I need to group the categories like below.
Europe
- England
Asia
- India
- Kerala
- Kochi
Note - Here Europe,England,Asia,India,Kerala,Kochi are categories. Asia is the parent category of India and India is the parent category of Kerala and Kerala is the parent category of Kochi.
Is there some nested groupBy solution?