Week 4 Group-By & Subqueries Flashcards
1
Q
What are Aggregate functions?
A
- Count
- Avg
- Sum
- Min
- Max
2
Q
What is Group-By & Having?
A
Group-By: How to sort the columns
Having: The conditions which must be met in order to be shown
3
Q
What is a sub-query & provide an example.
A
A sub-query is simple a query within a query.
E.g. where shrprice > ( select avg (shrprice) from shr).
4
Q
What is a Type 1 Nested Query?
A
- Query inside a query
- Uses where and having conditions
- Executes one at a time
5
Q
What is a Theta Join?
A
The process of joining tables without the use of “=”
6
Q
What is a Self-Join?
A
- The process of joining the same table together
- Usually involving a self-referencing relationship