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,

 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
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.
 
Upvote 0

Forum statistics

Threads
1,215,734
Messages
6,126,542
Members
449,316
Latest member
sravya

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top