SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
SELECT IFNULL(YEAR(payment_date), '') AS income_year, IFNULL(staff_id, '') AS staff, SUM(amount) AS total_payments FROM payment GROUP BY YEAR(payment_date), staff_id WITH ROLLUP ORDER BY income_year, staff; ; show status like 'Last_query_cost';

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear