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 |