16. Card Issuance Range

Easy

card_issuance(card_name, issue_month, issued_count)

For each card, return the spread between its busiest and quietest month: issuance_range is the highest issued_count minus the lowest.

Return card_name and issuance_range, ordered by card_name. A card with only one month has a range of 0.

Tables

card_issuance

card_name      issue_month  issued_count
-------------  -----------  ------------
Chase Freedom  2026-01-01   55000
Chase Freedom  2026-02-01   30000
Chase Freedom  2026-03-01   72000
Amex Gold      2026-01-01   41000
Solo Card      2026-05-01   9000

Expected result

card_name      issuance_range
-------------  --------------
Amex Gold      0
Chase Freedom  42000
Solo Card      0

Sign in to write and run your own code.

Write one SELECT query