🙏 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 21:

Years of Service in Sociology

MariaDB
On September 1, 2026, the Sociology department (department_id = 20) honors its teachers. For each of them in the faculty table, show how many full years they have worked by that date and on which weekday they were hired.
Output the columns first_name, last_name, hire_date, hire_weekday (the English weekday name, e.g. Monday) and years_of_service, sorted by hire_date.
Expected result Columns: 5 · Rows: 9
first_name last_name hire_date hire_weekday years_of_service

Sample rows open after wrong checks: 0 of 2

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