Statistics in the field C1 every number the number of occurrences of the following:
SELECT C1, count (*) FROM "ssq2" GROUP BY C1
The results are as follows:
C1 COUNT (*)
1 438
2 426
3 324
The desired effect is as follows:
C2 C1 COUNT (*) COUNT (*) C3 COUNT (*) C4 COUNT (*) C5 COUNT (*) C6 COUNT (*)
48 38 1 12 1 438 43 1 43
43 48 38 43 2 2 2 2 2 2 38 48
3 38 43 48 48 3 3 3 3 3 38 43
CodePudding user response:
You are to calculate the double chromosphere, six fields, write 6 SELECT, with the UNION ALL together, this is the simplest the most brutal way,