Skip to content
Advertisement

How to make correct query with complicated conditions?

I have this table:

I need to select only that band_names which participant set is not changed all time of its existance(date_join == active_years_begin and (date_left is null or active_years_end is null) or (date_left == active_years_end)) ) for all band participants.

So here right answer is The Beatles, Wings, Band1, Band2, Band3, Band4.

How can I do that?

Advertisement

Answer

enter image description here

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