Get startedGet started for free

Aliasing with functions

Aliasing can be a lifesaver, especially as we start to do more complex SQL queries with multiple criteria. Aliases help you keep your code clean and readable. For example, if you want to find the MAX() value of several fields without aliasing, you'll end up with the result with several columns called max and no idea which is which. You can fix this with aliasing.

Now, it's over to you to clean up the following queries.

This exercise is part of the course

Intermediate SQL

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

-- Calculate the title and duration_hours from films
SELECT title, ___
FROM films;
Edit and Run Code