Ollivander's Inventory

  • + 1 comment

    Why below code is throwing an error?? SELECT id, age, coins_needed, power FROM ( SELECT ROW_NUMBER() OVER(PARTITION BY w.power, wp.age ORDER BY w.coins_needed) AS rn, w.id AS id, wp.age AS age, w.coins_needed AS coins_needed, w.power AS power FROM Wands w JOIN Wands_Property wp ON w.code = wp.code WHERE wp.is_evil=0)t WHERE rn=1 ORDER BY power DESC, age DESC;