You are viewing a single comment's thread. Return to all comments →
i am nt sure this works. also, you are using the functionality of join. jst not using the keyword.
select d.id,table2.age,table2.cn,table2.pw from (select table1.age age,min(table1.cn) cn,table1.pw pw from (select b.age age,a.coins_needed cn, a.power pw from wands a , wands_property b
where a.code=b.code and b.is_evil=0 )table1 group by table1.age,table1.pw)table2, wands_property c, wands d
where table2.age=c.age and c.code=d.code and table2.cn=d.coins_needed order by 4 desc, 2 desc ;
this is in oracle sql