From the course: Advanced SQL: High Performance Relational Divisions
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
The pros and cons of these techniques - SQL Tutorial
From the course: Advanced SQL: High Performance Relational Divisions
The pros and cons of these techniques
- [Instructor] Let's kick off the comparison with the only non-subjective aspect, in my opinion, pun intended. The aggregation technique wins the flexibility category. It is the only technique that can be easily tweaked to solve what I call proximal division challenges. For good or bad, both the set operators and the nested subqueries techniques are an all or nothing deal. So what do I mean by proximal division? Relational division by definition is an all or nothing deal. The candidate is either a good fit for the role or is not. The aggregation technique allows for more flexibility. It knows how many elements are in the dividend and how many are in the divisor so we can use it to solve challenges that don't necessarily require an all or nothing fit. For example, we may want to find candidates who are close enough fit or only those who are slightly overqualified for a role, inclusion and leniency. Best explained with a…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.