import sqlite3

DB_PATH = "/app/companies_v3_fixed_2.db"
conn = sqlite3.connect(DB_PATH)
cursor = conn.cursor()

query = """
SELECT i.name, p.name, m.subject, m.intro, m.social_proof 
FROM marketing_matrix m
JOIN industries i ON m.industry_id = i.id
JOIN personas p ON m.persona_id = p.id
WHERE i.name = 'Leisure - Indoor Active'
"""

cursor.execute(query)
rows = cursor.fetchall()
for row in rows:
    print(f"Industry: {row[0]} | Persona: {row[1]}")
    print(f"  Subject: {row[2]}")
    print(f"  Intro: {row[3]}")
    print(f"  Social Proof: {row[4]}")
    print("-" * 50)
conn.close()
