import psycopg2
conn = psycopg2.connect("postgresql://supabase_admin:HzWrn2rMMxUYWO6OT5X0PScIVEvSjQMup9YSLIrkPQ@172.18.0.5:5432/sneakerpicks")
cur = conn.cursor()
cur.execute("SELECT id, name, external_id, product_count, last_sync_status FROM feeds ORDER BY id")
for r in cur.fetchall():
    print(r)
cur.execute("SELECT COUNT(*) FROM product_offers")
print(f"\nTotal offers: {cur.fetchone()[0]}")
cur.execute("SELECT COUNT(*) FROM products")
print(f"Total products: {cur.fetchone()[0]}")
conn.close()
