Home > database >  How to realize the horizontal longitudinal sorting at the same time
How to realize the horizontal longitudinal sorting at the same time

Time:11-07

As shown in figure, want to use SQL run out of every city, every month, every day during the month of the activation rate (activate/card), and nearly twenty cities, and only a city with a city union together, in other ways, consult a great god



CodePudding user response:

The top one, don't sink

CodePudding user response:

Dynamic statement joining together

CodePudding user response:

Select * from table name for the order by the date the pivot (sum (number) for the city (in [Beijing], [Shanghai], [hangzhou]... )
SQL server 2005 or more versions are available
  • Related