🙏 We need your help! SQLtest.online has no ads and lives only on donations. Even a small amount helps. Donate now →
SQL code copied to buffer
Task 45:

Enhance Payments Analysis

MySQL
Improve the solution to the previous problem by replacing the staff_id column with staff, displaying the staff member full name (last name and first name separated by a space) and "Year total " in the subtotal lines.
Also put "Total" on the last line of income_year and empty string in staff column.
Expected result Columns: 3 · Rows: 7
income_year staff total_payments

Sample rows open after wrong checks: 0 of 3

Write your query below and click "Check it!". Tables are described in the right pane.

Tutorial

By checking a query, you agree that it is stored without your account details and may be included in anonymized datasets, including for AI training. Learn more

The query result will appear here. Ctrl+Enter - Run query