97

Account Type Summary

Hardmultiple aggregationsGROUP BY

Problem Description

Write a SQL query to create a comprehensive summary by account type.

Expected Columns

  • account_type
  • num_accounts
  • total_balance
  • avg_balance
  • max_balance

Example Output

| account_type | num_accounts | total_balance | avg_balance | max_balance | |--------------|--------------|---------------|-------------|-------------| | Savings | 6 | 534502.0 | 89083.67 | 180000.0 | | Current | 2 | 1250000.0 | 625000.0 | 750000.0 | | ... | ... | ... | ... | ... |

Hints

Unlocks after 2 more attempts
Submit your solution to unlock hints
//#97 Account Type Summary
Hard

Loading schema...

Loading editor...

No results yet

Run a query to see results