Skip to content
Advertisement

PostreSQL returning only specific value

I’ve got below structure:

sample_table

I want to output how many code (counted) has the OK delivery status. I was trying to do something like:

Edit The expected output should be like below

Advertisement

Answer

In Postgres, the filter() clause comes handy for this:

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement