SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
SELECT quarter(payment_date) quarter, monthname(payment_date) month_nm, sum(amount) monthly_sales, rank() over (order by sum(amount) desc) sales_rank FROM payment WHERE year(payment_date) = 2005 GROUP BY quarter(payment_date), monthname(payment_date) ORDER BY 1, month_nm

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear