SQL Table Transformation Lesson 1 Exercise 4/7



I am just trying to understand how this code works. First of all, I don't understand in the beginning the "a.dep_month" and "a.dep_day_of_week" I understand the a is being used as an alias for a table name, however it is never defined in the code.. Another question is the grouping, how is the data being grouped by using numbers 1, 2, 3 when it is never defined and also it was never shown in the previous lesson.


Honestly, I am going to make a guess.

'a' is the name of table generated through the inner query. Look closely, 'a' is defined after the parentheses close of inner query.

1,2,3 are no defined. But there refer to columns 1,2 and 3. It wasn't covered earlier in the chapter. I learnt about it by just playing around with the code.


Yea I figured by just looking at it that's what it meant, I was hoping the message would get to an admin of the site so they can fix it or explain it in an earlier lesson.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.