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.
especially the subquery: "select min(coins_needed) from Wands as w1 join Wands_Property as p1 on (w1.code = p1.code) where w1.power = w.power and p1.age = p.age".
WHY using "where w1.power = w.power and p1.age = p.age"?
Is this subquery retrieving the minimum price for each combo of "power" and "age"? if so, how is it doing it?
like, WHY is it referencing the values from outer query (for example, p.age and w.power do not belong to this subquery)?
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 →
I am not understanding this solution! >__<
especially the subquery: "select min(coins_needed) from Wands as w1 join Wands_Property as p1 on (w1.code = p1.code) where w1.power = w.power and p1.age = p.age".
WHY using "where w1.power = w.power and p1.age = p.age"?
Is this subquery retrieving the minimum price for each combo of "power" and "age"? if so, how is it doing it?
like, WHY is it referencing the values from outer query (for example, p.age and w.power do not belong to this subquery)?