"""Check LDCE data in SQLite database.""" import sqlite3 conn = sqlite3.connect("data/ragdb.sqlite") cur = conn.cursor() # Search for LDCE with various name patterns cur.execute( "SELECT institute_name, course, open_hs, sc_hs, st_hs, sebc_hs, ews_hs, esm_hs, tfws_hs, open_ai, tfws_ai " "FROM cutoffs WHERE institute_name LIKE '%L.D.%' " "OR institute_name LIKE '%LD %' " "OR institute_name LIKE '%LDCE%' " "OR institute_name LIKE '%L D %'" ) rows = cur.fetchall() print(f"Found {len(rows)} LDCE rows\n") for r in rows: print(f" Name: {r[0]}") print(f" Course: {r[1]}") print(f" open_hs={r[2]}, sc_hs={r[3]}, st_hs={r[4]}, sebc_hs={r[5]}, ews_hs={r[6]}") print(f" esm_hs={r[7]}, tfws_hs={r[8]}, open_ai={r[9]}, tfws_ai={r[10]}") print() # Also show all distinct institute names containing 'college of eng' print("\n--- All institutes with 'College Of Eng' ---") cur.execute( "SELECT DISTINCT institute_name FROM cutoffs " "WHERE institute_name LIKE '%College Of Eng%' ORDER BY institute_name" ) for r in cur.fetchall(): print(f" {r[0]}") conn.close()