SQL - group by two bits
I have a SQL table with one bit column. If only one bit value is encountered in the rows of the table (in my case 1), how can I make a SELECT statement that shows, for example, the presence of both bit values ββin the table, even if the other does not happen? This is the result I am trying to achieve:
+----------+--------+
| IsItTrue | AMOUNT |
+----------+--------+
| 1 | 12 |
| 0 | NULL |
+----------+--------+
I have already tried Google's answer, but with no success as English is not my native language and I am not familiar with SQL jargon.
+3
source to share