Your question is Sum From 1 to 1,000,000. Start with the requirements and the one table on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Virtu Financial's Triton platform maintains a validation table containing integer sequence values used in data-quality checks. Write a PostgreSQL query to calculate the sum of every integer from 1 through 1,000,000, inclusive.
The sequence_values table contains one row for each required integer. It may also contain NULL values or values outside the target range, which must not affect the result.
total_sum.| Column | Type | Description |
|---|---|---|
| value_idPK | BIGINT | Unique row identifier |
| sequence_value | INTEGER | Integer value used in the validation sequence |