You are viewing a single comment's thread. Return to all comments →
MySql 5.7
SELECT w.id, wp.age, w.coins_needed, w.power FROM wands w JOIN wands_property wp ON wp.code = w.code WHERE wp.is_evil = 0 AND w.coins_needed = ( SELECT MIN(coins_needed) FROM wands derived_w JOIN wands_property derived_wp ON derived_wp.code = derived_w.code WHERE derived_wp.age = wp.age AND derived_w.power = w.power ) ORDER BY w.power DESC, wp.age DESC ;
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 →
MySql 5.7