Week 31 - SQL & Query Techniques

Frosty Friday's super academy wants to know who their best and worst super heroes are, and the only metric that matters is villains defeated. Using MIN_BY and MAX_BY, tell us which super hero is the best, and which is the worst.

create or replace table w31(id int, hero_name string, villains_defeated number);insert into w31 values(1, 'Pigman', 5),(2, 'The OX', 10),(3, 'Zaranine', 4),(4, 'Frostus', 8),(5, 'Fridayus', 1),(6, 'SheFrost', 13),(7, 'Dezzin', 2.3),(8, 'Orn', 7),(9, 'Killder', 6),(10, 'PolarBeast', 11);

Your end result should look something like this:

Remember, if you want to participate:

  1. Sign up as a member of Frosty Friday. You can do this by clicking on the sidebar, and then going to ‘REGISTER
  2. Post your code to GitHub and make it publicly available (Check out our guide if you don’t know how to here)
  3. Post the URL in the comments of the challenge
Previous
Previous

Week 32 - Security & Governance

Next
Next

Week 30 - Administration