SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
select concat(year(payment_date), '-', lpad(month(payment_date),2,'0')) as payment_month, sum(amount) as payment_amount from payment group by year(payment_date), month(payment_date), payment_month order by year(payment_date) desc, month(payment_date) desc ; show status like 'Last_query_cost';

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear