You are viewing a single comment's thread. Return to all comments →
MSSQL
select w.id, wp.age, w.coins_needed, w.power from wands w inner join ( select code, power, min(coins_needed) as min_coins from wands group by code, power) as mc on w.code = mc.code inner join wands_property wp on w.code = wp.code where wp.is_evil = 0 and w.coins_needed = mc.min_coins order by mc.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 →
MSSQL