Skip to content
Advertisement

How to choose in postgresql rows where amount of one value is bigger than another? [closed]

how to choose in postgresql rows where amount of one value is bigger than another? For example I need to choose only those where recommended is bigger:

enter image description here

In other words:

I tried to count group by place, opinion

Advertisement

Answer

If you are looking for places where recommended is bigger than not recommended, you can use aggregation:

You can also express this a bit more simply as:

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