Skip to content

Commit

Permalink
Basic Join
Browse files Browse the repository at this point in the history
  • Loading branch information
CodingProgrammer authored Apr 23, 2018
1 parent a10128d commit 96ce08e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Ollivander's_Inventory.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
select W.id, WP.age, W.coins_needed, W.power from Wands W
inner join Wands_Property WP on WP.code = W.code
where WP.is_evil = 0 and w.coins_needed =
(select min(coins_needed) from Wands W1
join Wands_Property WP1 on (W1.code = WP1.code)
where W1.power = W.power and WP1.age = WP.age)
order by W.power desc, WP.age desc;

0 comments on commit 96ce08e

Please sign in to comment.