Skip to content

Commit

Permalink
history fix
Browse files Browse the repository at this point in the history
  • Loading branch information
daviidarr committed Apr 23, 2024
1 parent db500e6 commit a096b76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def query_table_at(self, addresses: list[str], timestamp: int, table_name: Table
for address in addresses], ignore_index=True, axis=0)

def query_table_between(self, addresses: list[str], start_timestamp: int, end_timestamp: int, table_name: TableType) -> pd.DataFrame:
return pd.concat([pd.read_sql_query(f'SELECT * FROM {table_name}_{address} WHERE {start_timestamp} <= timestamp <= {end_timestamp}',self.conn)
return pd.concat([pd.read_sql_query(f'SELECT * FROM {table_name}_{address} WHERE timestamp BETWEEN {start_timestamp} AND {end_timestamp}',self.conn)
for address in addresses], ignore_index=True, axis=0)

def all_timestamps(self, address: str, table_name: TableType) -> list[int]:
Expand Down

0 comments on commit a096b76

Please sign in to comment.