Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 3144 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I'm tying to write an ExecuteSQL for charting.

I can get it to work with out selecting a Date Filed (OrderDate). What I want to do in the end is do a "Where OrderDate = mm/dd/yyyy" to filter out by date. But in testing I'm not even able to even get SELECT to work.

=================================
ExecuteSQL ("
SELECT SKU, SUM(Quantity) as ProductTotal
FROM LineItems
GROUP BY SKU
ORDER BY ProductTotal DESC FETCH FIRST 20 ROWS ONLY
"
; "|" ; ¶ )
=================================
 

Posted (edited)

Hi,

Try

    ORDER BY 2 DESC..... (ref to second column)

Good luck

G

 

Edited by LAIRY
spelling mistake

This topic is 3144 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.