I'm writing a query in Oracle SQL. I'm using a count - group by query, for example:
select column_a, count(*)
from table_1
group by column_a
COLUMN_A COUNT(*)
value_1 5
value_2 6
value_3 2
(null) 1
Can I write a group by that allows me to get two result rows, one with value_1 and its count, and another with the count of all other values? It would look like this:
COLUMN_A COUNT(*)
value_1 5
others 9
برچسب:
نویسنده: استخدام کار