Code Challenge: Aggregate Functions Code Challenge 9

I’ve noticed on the Code Challenge 9 that the SELECT Clause would not let me write MIN(…), MAX(…)

Example:

SELECT MIN(watch_duration_in_minutes) AS ‘Min’,
MAX(watch_duration_in_minutes) AS ‘Max’
FROM watch_history;

I would get an error stating that it is incorrect. I just went and review the questions again and it just said " Use one query and rename the results to max and min."

Does the Order of operation/rules apply to MAX & MIN in the SELECT Clause, or must it be MAX & MIN? I didn’t see this on regarding to the order of operations for the use of these clause or must have missed it?

Hello, @rubysurfer86188.

Welcome to the forums.

It’s not that your code isn’t a valid SQL query. It does return the correct results, but it returns them in the opposite order requested by the exercise’s instructions. Sometimes (frequently) the SCT for the exercises is very picky.