In the previous lesson, we have used the structure of column alias and table alias. Same structure is revised below
FROM "table_name" "table_alias"
Now, we are going to use AS keyword for assigning alias to the given table or column. It should be place in the middle of the name of column and column alias. On the other hand, it can be lace in the middle of the name of the given table and table alias. The structure for AS is given here,
FROM "table_name" AS "table_alias"
We can understand it with the help of this example.
San Diego $1550 Jan-06-2011
San Diego $350 Jan-07-2011
Los Angeles $400 Jan-08-2011
Boston $750 Jan-09-2011
In order to know the total amount of our sale, we will write the syntax like this:
FROM Store_Information AS A1
GROUP BY A1.store_name
San Diego $1900
Los Angeles $400