Peak Sales Day
sales has columns day (text) and amount. Return the day with the largest amount. If several days tie, return the one that appears first.
Example 1
sales {"day":["Mon","Tue","Wed"],"amount":[5,9,9]}
returns "Tue"
Tue and Wed tie at 9, Tue comes first.
Constraints
- At least one row
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.