
import sqlite3

def read_verticals():
    conn = sqlite3.connect('/app/companies_v3_fixed_2.db')
    cursor = conn.cursor()
    
    verticals = [
        "Energy - Grid & Utilities",
        "Retail - Non-Food",
        "Tech - Data Center",
        "Healthcare - Hospital"
    ]
    
    for v_name in verticals:
        cursor.execute("SELECT name, pains, gains, primary_category_id, secondary_category_id, ops_focus_secondary FROM industries WHERE name = ?", (v_name,))
        row = cursor.fetchone()
        if row:
            print(f"--- {row[0]} ---")
            print(f"Primary ID: {row[3]}, Secondary ID: {row[4]}, Ops Focus Secondary: {row[5]}")
            print(f"PAINS:\n{row[1]}")
            print(f"GAINS:\n{row[2]}\n")
        else:
            print(f"Vertical '{v_name}' not found.")
            
    conn.close()

if __name__ == "__main__":
    read_verticals()
