20 lines
395 B
Python
20 lines
395 B
Python
from database import TradeDB
|
|
db = TradeDB()
|
|
try:
|
|
sql = """
|
|
SELECT
|
|
source, COUNT(*) as cnt
|
|
FROM ws_ticks
|
|
WHERE DATE(recv_ts) = '2026-08-10'
|
|
GROUP BY source;
|
|
"""
|
|
rows = db.conn.execute(sql).fetchall()
|
|
|
|
import json
|
|
print("\n--- ws_ticks source count Today ---")
|
|
for r in rows:
|
|
print(json.dumps(dict(r)))
|
|
|
|
finally:
|
|
db.close()
|