We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Select w.id, wp.age,w.coins_needed,w.power
From Wands w,
Wands_Property wp
where w.code=wp.code and
w.coins_needed IN ( select Min(coins_needed)
from Wands wan
where wan.code= wp.code
and wp.is_evil=0
group by wan.power
)
order by w.power desc,wp.age desc;
That's my solution in oracle.here you are.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Ollivander's Inventory
You are viewing a single comment's thread. Return to all comments →
Select w.id, wp.age,w.coins_needed,w.power From Wands w, Wands_Property wp where w.code=wp.code and w.coins_needed IN ( select Min(coins_needed) from Wands wan where wan.code= wp.code and wp.is_evil=0 group by wan.power ) order by w.power desc,wp.age desc;
That's my solution in oracle.here you are.