From the course: Advanced SQL: High Performance Relational Divisions

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Multiple divisors

Multiple divisors - SQL Tutorial

From the course: Advanced SQL: High Performance Relational Divisions

Start my 1-month free trial

Multiple divisors

- [Instructor] So far, all our queries had a fixed divisor. What do I mean? All candidates, the dividend, were evaluated for a fixed a set of skills either oral skills or a subset of skills required for a specific role. But, why not take it one step further, and match all candidates to all open roles at once? Don't answer, it's a rhetorical question, and this is exactly what multiple divisors are about. And we can solve this challenge with all three techniques. To save us time, we'll use the queries that match candidates for the DB architect role as our starting point. Here is the relational division query that uses aggregates. Pause the video and review the aggregation technique. This time we need all skills for all roles. So the width clause is no longer needed. Let's get rid of it and replace it with Role Skills place it in the from clause. Don't forget to change the aliases, great. Let me put a star in the select…

Contents