Query - Google Sheet - SQL

WillSTARK

New Member
Joined
Jan 25, 2017
Messages
13
Hi,

If anyone is familiar with SQL or Query (from Google) then one may be able to help me.

I have this Query (which works)=
QUERY(E12:G9620,"select count(G) where E = 'Engineering' and G like '%/%' or G <>''")

Yet when I add date conditions as below, it does not work and shows (#Values!):
=QUERY(E12:G9620,"select count(G) where E = 'Engineering' and G like '%/%' or G <>' and G > date '2016-10-15' and G < date '2017-01-15")

I may miss something in the syntax, yet being a beginner I do not see it. I broke it down but when I assemble pieces of the query it does not work.

Thanks in advance,

 

Some videos you may like

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

J.Ty.

Well-known Member
Joined
Feb 4, 2012
Messages
1,109
Office Version
365, 2013, 2010
Platform
Windows, Web
Just first ideas (I do not have time to make tests) about your logical statement
Rich (BB code):
E = 'Engineering' and G like '%/%' or G <>' and G > date '2016-10-15' and G < date '2017-01-15")


1. You should add parentheses to make sure how it is computed
2. Something is wrong with the ' signs, which delineate text strings.

J.Ty.
 

Watch MrExcel Video

Forum statistics

Threads
1,099,491
Messages
5,468,925
Members
406,620
Latest member
Gitani123

This Week's Hot Topics

Top