Credit Card Launch Analysis
JPMorgan ☯️ Medium SQL
Beginner Mode

Objective

Write a SQL query to list each credit card along with the number of cards issued in its launch month.

Table Schema:

  • monthly_cards_issued
Column Type Description
card_name VARCHAR Name of the credit card
issued_amount INTEGER Number of cards issued that month
issue_month INTEGER Month number (1-12)
issue_year INTEGER Year of issuance

Task Requirements:

  • The launch month is the earliest month-year combination recorded for each card
  • Retrieve the issued_amount for each card's launch month
  • Sort the results by issued_amount in descending order

Output columns: card_name, issued_amount

Examples

Example 1:

Input:

monthly_cards_issued
card_nameissue_monthissue_yearissued_amount
Chase Sapphire1202350000
Chase Sapphire2202362000
Chase Sapphire3202371000
Amex Gold3202335000
Amex Gold4202342000
Amex Gold5202355000
Capital One Venture2202328000
Capital One Venture3202331000

Output:
card_nameissued_amount
Chase Sapphire50000
Amex Gold35000
Capital One Venture28000
Quick Solution

Code Environment

Sign in or try as guest to run your code.

Sign In

Track

Question Difficulty Company Access
Need more practice in this area? Explore more questions →