Skip to content
Advertisement

How to get weekending having all approved records?

I have a table like below

now want to get weekending ‘3/1/2020’ since it have all 1’s in isApproved like this I want to get list of weekending having all 1’s in isApproved

Advertisement

Answer

You can use aggregation and filter with a having clause:

This works because isapproved only has 0/1 values. So condition min(isapproved) = 1 actually ensures that there is no 0 value.

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