Reporting Aggregated Data
Using the Group Functions
Lesson 4
· I learned in this lesson how to group data from the lowest to the highest.
· And I also know the 7 group function.
Ø AVG
Ø COUNT
Ø MAX
Ø MIN
Ø STDDEV
Ø SUM
Ø VARIANCE
I learned also that:
ü Where clause cannot use the to restrict the instead of where you can use having clause to restrict the groups.
ü You can use GROUP BY clause to divide rows in a table to a smaller groups.
ü You can also use GROUP BY in multiple columns.
Displaying Data
from Multiple TablesDisplaying Data
from Multiple Tables
LESSON 5
Lesson 5 is all about JOINS I learn in this lesson how to join table from another table using:
• Equijoins
• Nonequijoins
• Outer joins
• Self-joins
• Cross joins
• Natural joins
• Full (or two-sided) outer joins
Equijoins - is adding two tables with the same name.
Using - is use to match only one column when more than one column matches.
Self-join - if the two tables have the same output. Like the manager_id from employees and the employee_id from manager table you can use Self-join.
In this lesson I also know how to use Aliases.
· Aliases is use to simplify queries.
· You can use any characters for your queries.
· And it also use to improve our performance
Using Subqueries to Solve Queries
Lesson 6
In this lesson I learned that:
ü What is subqueries.
ü A subquery is a SELECT statement that is embedded in clause of another SQL Statement.
ü I already know how to write single row and multiple row Subqueries
And I learned that this operator is use for single row comparison:
1. = equal to
2. > greater than
3. >= greater than or equal to
4. <= less than or equal to
5. <> not equal
And I also learned the uses of multiple-row comparison operator:
1. IN - Equal in any member in the list
2. ANY - Compare value to each value returned by the
subquery
3. ALL - Compare value to every value returned by the
subquery