Keep SQLtest alive: Help cover this month's $100 server costs to keep all lessons and the SQL playground online. Support the project →
SQL code copied to buffer
Task 2:

Student Enrollment Age

MariaDB
Create a query to retrieve information about students from the students table. Your output should include the following columns:
- student_number
- first_name
- last_name
- date_of_birth
- enrollment_date
- A calculated column named age_at_enrollment that represents the age of each student at the time of enrollment.

The results should be sorted by age_at_enrollment in ascending order.
Expected result Columns: 6 · Rows: 2000
student_number first_name last_name date_of_birth enrollment_date age_at_enrollment

Sample rows open after wrong checks: 0 of 2

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

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

Hi! Could we please enable some services and cookies to improve your experience and our website?

Privacy & Cookie Policy.