Query Rewrites: Predicate Pushdown (through grouping)
Select   bid, Max(age)
From    Reserves R, Sailors S
Where  R.sid=S.sid 
GroupBy  bid
Having Max(age) > 40
Select   bid, Max(age)
From    Reserves R, Sailors S
Where  R.sid=S.sid  and
             S.age > 40
GroupBy  bid
• For each boat, find the maximal age of sailors who’ve reserved it.
•Advantage: the size of the join will be smaller.
• Requires transformation rules specific to the grouping/aggregation
   operators.
• Will it work work if we replace Max by Min?