SQL Practice Logo

SQLPractice Online

Level 9 - DistinguishedQuery-Based Questionsm5 distributed sql sharding consistency

Shard-Local Balance Snapshot

Write SQL to return latest balance snapshot for account_id 9001 in the last 30 days with account_id, as_of_ts, and balance.

Schema Context

account_balances(account_id, as_of_ts, balance) sharded by account_id