import psycopg2
conn = psycopg2.connect("postgresql://supabase_admin:HzWrn2rMMxUYWO6OT5X0PScIVEvSjQMup9YSLIrkPQ@172.18.0.5:5432/sneakerpicks")
cur = conn.cursor()
cur.execute("SELECT COUNT(*) FROM products")
print(f"Products: {cur.fetchone()[0]}")
cur.execute("SELECT COUNT(*) FROM product_offers")
print(f"Offers: {cur.fetchone()[0]}")
cur.execute("SELECT f.name, COUNT(po.id) FROM feeds f LEFT JOIN product_offers po ON po.feed_id = f.id GROUP BY f.name ORDER BY count DESC")
for r in cur.fetchall():
    print(f"  {r[0]}: {r[1]}")
conn.close()
