diff --git a/models/silver/swaps/jupiter/v6/silver__swaps_inner_intermediate_jupiterv6.sql b/models/silver/swaps/jupiter/v6/silver__swaps_inner_intermediate_jupiterv6.sql index 4fd586845..2a19fd834 100644 --- a/models/silver/swaps/jupiter/v6/silver__swaps_inner_intermediate_jupiterv6.sql +++ b/models/silver/swaps/jupiter/v6/silver__swaps_inner_intermediate_jupiterv6.sql @@ -160,7 +160,7 @@ SELECT b.tx_id, b.index, b.inner_index, - row_number() OVER (PARTITION BY b.tx_id, b.index ORDER BY b.inner_index)-1 AS swap_index, + row_number() OVER (PARTITION BY b.tx_id, b.index, s.inner_index ORDER BY b.inner_index)-1 AS swap_index, /* we want the swap index as it relates to the top level swap instruction */ b.succeeded, b.program_id AS swap_program_id, 'JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4' AS aggregator_program_id, diff --git a/models/silver/swaps/jupiter/v6/silver__swaps_inner_intermediate_jupiterv6.yml b/models/silver/swaps/jupiter/v6/silver__swaps_inner_intermediate_jupiterv6.yml index 656e3c77f..960b3f89b 100644 --- a/models/silver/swaps/jupiter/v6/silver__swaps_inner_intermediate_jupiterv6.yml +++ b/models/silver/swaps/jupiter/v6/silver__swaps_inner_intermediate_jupiterv6.yml @@ -53,7 +53,7 @@ models: tests: - not_null: *recent_date_filter - name: SWAP_INDEX - description: "{{ doc('swaps_swap_index') }}" + description: "{{ doc('swaps_swap_index') }} as it relates to the top level Jupiter V6 swap instruction" tests: - not_null: *recent_date_filter - name: SUCCEEDED