Skip to content
Advertisement

Group by the records and that particular group if condition matched then set final result like below

I want to group by the records and that particular group if the condition matched then set final result like below

For each group, I want to check the following condition

Advertisement

Answer

You can use conditional logic:

Here is a db<>fiddle.

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