-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deleting entries fixes if script restarts
- Loading branch information
1 parent
e89681f
commit ea28651
Showing
3 changed files
with
13 additions
and
4 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,11 @@ | ||
SELECT MAX(block_number) FROM raw_token_imbalances | ||
WHERE chain_name = :chain_name; | ||
SELECT | ||
MIN(max_block_number) AS min_max_block_number | ||
FROM ( | ||
SELECT MAX(block_number) AS max_block_number | ||
FROM raw_token_imbalances | ||
WHERE chain_name = :chain_name | ||
UNION ALL | ||
SELECT MAX(block_number) AS max_block_number | ||
FROM slippage_prices | ||
WHERE chain_name = :chain_name | ||
) AS max_blocks; |