0

I have the following a table with multiple Rows. this table have different service on daily basis, and I need to display the data horizontally instead of vertically for the following select.

Select Service,Count(*) from Table group by Service; 
| Service | Number |
| -------- | -------- |
| 100   | 1111   |
| 101   | 1234   |
  100     121212
  101     12222
  102     133333

I want it to look like this

100 101  102
2    2   1

I used the case in the select, but each time I have to mention the service, which is impossible as I don't have a fixed number of services it might differed from day to another. and i have more than 100 service so i can't mentioned 100 case in my select.

Nour
  • 1
  • 1

0 Answers0