Alex
Alex

Reputation: 79

QUERY with double condition in Google Sheets

I have a table similar to this

A     B     C     D     E
a1    b1    5     d1   
a2    b2    5     d2
a3    b1    3           e1
a4    b3    4           e2
a5    b1    5     d3    e3

I'm trying to figure out a query that shows A,B,C,D if the value in D is not empty

SELECT A,B,C,D WHERE D is not null

Also, if the value in the C column is lower or equal to 3 I need it to show the values in column E, even if D is empty.

Upvotes: 2

Views: 187

Answers (1)

player0
player0

Reputation: 1

try:

=QUERY(A2:E, "where D is not null or C <= 3", 0)

enter image description here

Upvotes: 1

Related Questions