I have an inventory table in database that shows id, code, description and class1. It looks a bit like this:
id code description class1
--------------------------------------
1 001 Office stationary 101
2 002 Computer stationary 101
3 003 Documents 101
4 001 Surgical products 107
5 002 Urological products 107
How do I categorize them according to class1? What condition should I use?
I wanted the output to look more like this:
101 - 001 Office stationary - 002 Computer stationary - 003 Documents
107 - 001 Surgical products - 002 Urological products
