database - Get Count of Records in Separate Column -
this question has answer here:
- different value counts on same column 3 answers
table : status_table
id | status | ================= 1 true 2 false 3 false 4 true
how can count of both true , false in separate column using oracle?? must show record status true. put condition. must display count of both. like
marked_record unmarked_record 2 2
how like
select sum(case when status = 'true' 1 else 0 end) marked_record, sum(case when status = 'false' 1 else 0 end) unmarked_record status_table
Comments
Post a Comment