You are viewing a single comment's thread. Return to all comments →
here is my simple and easy to understand solution
select t2.i, t.a, t.c, t.p from (select wp.age a ,min(w.coins_needed) c , max(w.power) p from Wands w, Wands_Property wp where wp.code=w.code and wp.is_evil=0 group by wp.age, w.power) as t, (select ww.id i , wpp.age aa , ww.coins_needed cc , ww.power pp from Wands ww, Wands_Property wpp where wpp.code=ww.code and wpp.is_evil=0) as t2 where t2.aa=t.a and t2.cc=t.c and t2.pp=t.p order by t.p desc, t.a desc;
Ollivander's Inventory
You are viewing a single comment's thread. Return to all comments →
here is my simple and easy to understand solution