Hi! Could we please enable some services and cookies to improve your experience and our website?

SQLize | PHPize | SQLtest

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

A A A
Login    Share code      Blog   FAQ
Copy Format Clear
select C.Ow_id, month (t.cash_dt) as month_of_cash, sum(t.POS) as sum_pos FROM Clients C JOIN Transactions T ON T.Ow_id = C.Ow_id where CASH_DT between ADD_MONTHS (TRUNC(SYSDATE), -2) and ADD_MONTHS (TRUNC(SYSDATE), -1) group by C.Ow_id, month (c.cash_dt)

Stuck with a problem? Got Error? Ask AI support!

Copy Clear