mardi 22 mars 2016

How to get number of false in every column of a table?

I have a table say T_myTable it has 5 columns and all have some values either true or false.

--------------------------------
col1 | col2 | col3 | col4 | col5
--------------------------------
true | false|false|true |false
false| true |false|false|false
true | false|false|true |false
false| false|false|true |false

I want to get result as:-

col1 | col2 | col3 | col4 | col5
--------------------------------
2    | 3    |4     |1     |4

Where these numbers here are numbers of false.

Aucun commentaire:

Enregistrer un commentaire