Let’s assume I have four fields A,B,C,D
I need SQL query to show results only when two or more fields are not null
Question posted in PostgreSQL
The official documentation can be found here.
The official documentation can be found here.
2
Answers
For Postgres you can use:
If you want ANSI SQL which would work with any SQL database, you would need to use a case expression. It gets a bit cumbersome because case is pretty wordy, but is relatively straightforward: