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 user_id, SUM(amount) as total_spent FROM transactions WHERE transaction_date >= DATEADD(month, -1, GETDATE()) GROUP BY user_id HAVING SUM(amount) > 10000

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

Copy Clear