ODBC guide

Read orders placed in last 30 days


Gets orders from the last 30 days using relative date functions. Set StartDate='today-30day' and EndDate='today' in the WITH clause. You can also use yesterday, yearstart, yearend, monthstart, monthend, and intervals like yearstart-1y.

SELECT * FROM Orders 
--WHERE Currency='USD' AND TotalInPayoutCurrency>=1599
WITH (StartDate='today-30day', EndDate='today') -- try today, yesterday, yearstart, yearend, monthstart, monthend, yearstart-1y