Use sql to do the migration matrix

Differences in data analysis, data is commonly used when a map is called migration matrix.

Where value can be inside the number or as a percentage, we can clearly see the number of migrating between another point in time or another time point from a class point of time.

For example, this time in company with my business checking-star customer data using sql when he realized the migration matrix

The idea is to be the first data row column turn, and then statistics.

 

Guess you like

Origin www.cnblogs.com/wqbin/p/11274929.html