Write a query to find the daily active users (DAU) who traded a specific cryptocurrency pair on Kraken Digital Asset Exchange, and calculate the week-over-week growth rate.
Use completed trades for the BTC/USD pair during January 1 through January 14, 2024. Compare each active date with the same date seven days earlier.
trade_date, dau, prior_week_dau, and wow_growth_pct.NULL for growth when no prior-week value exists, and sort by trade_date ascending.| Column | Type | Description |
|---|---|---|
| trade_idPK | INT | Unique trade identifier |
| user_id | INT | Kraken user identifier associated with the trade |
| pair_id | INT | Reference to the traded cryptocurrency pair |
| trade_timestamp | TIMESTAMP | Timestamp when the trade occurred |
| trade_status | VARCHAR(20) | Trade lifecycle status |
| Column | Type | Description |
|---|---|---|
| pair_idPK | INT | Unique trading-pair identifier |
| pair_code | VARCHAR(20) | Kraken market code, such as BTC/USD |
| base_asset | VARCHAR(10) | Base cryptocurrency |
| quote_asset | VARCHAR(10) | Quote currency or cryptocurrency |