Tuesday, December 15, 2020

SQL Logical Query Processing Order

Order of SQL Query processing

1. FROM (Choose and join tables to get base data)
- table to query
- join
2. WHERE (Filters the base data)
- filter rows
- only rows for which predicates is true
3. GROUP BY (Aggregates the base data)
- it associates each input rows to its respective group
4. HAVING (Filters the base data)
- filters the aggregated data.
5. SELECT(Window functions happen here!)
- returns the final data
6. ORDER BY
-Sorts the final data
7. OFFSET FETCH (LIMIT,Paging)
- Limits the returned data toa row count

No comments:

Post a Comment

SOLID-Design-Principles

SOLID-Design-Principles The SOLID principles are fundamental to designing effective, maintainable, object-oriented systems. Whether you...