SQL Challenges · WEEKLY QUACK CHALLENGE!

THE BAKER'S DOZEN

Difficulty: medium

Baker Sheldrake peers over the pastry counter at Duckbert. We sold a mountain of biscuits — but which item actually raked in the most bread? Quantity fools the eye, Duckbert. Find the item with the highest revenue that isnt our unit king.

Your task

Each item’s revenue is its total quantity sold times its price. Among all items that are NOT the single best-seller by total quantity sold, return the name of the one with the highest revenue. On a revenue tie, return the alphabetically first. You will be working with the `order_items` and `items` tables.

Play this challenge →