Query Rewrite:Pushing predicates up
Create View V1 AS
Select rating, Min(age)
From Sailors S
Where S.age < 20
GroupBy rating
Create View V2 AS
Select sid, rating, age, date
From Sailors S, Reserves R
Where R.sid=S.sid
Select sid, date
From V1, V2
Where V1.rating = V2.rating and
V1.age = V2.age
Sailing wizz dates: when did the youngest of each sailor level rent boats?
Previous slide
Next slide
Back to first slide
View graphic version