count - SQL Server CE 4.0 - Counting frequency of distinct values in multiple columns -


I have a table with 20 columns and each row can have 0-4 (integer) value . / P>

I would like to count the number of 0, the number of 1, the number of 2 in each column, which is for the subset given in that table, where the section is specified.

A friend suggested the partition , but that is not supported in SQL Server CE. I suspect that I have to use the counting (expression) , but I can not understand what the expression will be.

Can someone suggest me?

Consider that you have a table Enter image details here

  minimum (subset. G) Choose, in the form of 'G1' and 'C1 & amp; amp; Choose + Cast (Val 1 to Vaikar (4)), select G as V as 'C2 & amp;' + Cast (Vertical form of Val 2 (4)) Val2 as the Val2 from the testing union as Sub Sets Group by Left (subset.g, 2), as the subtotal order 'C3 & amp; ' The result set will be such as  

Enter image details here


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

lua - HowTo create a fuel bar -