How do I simply switch Rows with Column in SQL with count? Is there any way to do? Actually i want against each unique mobile no with count and product name side by side means if two mobile no in table then count = 2 and side of that two product1,product2 shows in output.
ie turn this result:
Srno Name| Mobile| Count | ProductName
1 xyz 1234 1 LNM
2 PQR 5678 1 VCD
3 xyz 1234 1 KLM
4 PQR 5678 1 NMG
into this:
Srno Name| Mobile| Count | ProductName1 | ProductName2
1 xyz 1234 2 LNM KLM
2 PQR 5678 2 VCD NMG