import sqlite3
conn = sqlite3.connect(':memory:')
conn.execute('CREATE TABLE foo (a INT, b INT)')
# try to reproduce the exact error
try:
    conn.execute('SELECT * FROM foo WHERE ("LOWER(A) NOT LIKE ?", "LOWER(A) NOT LIKE ?")')
except Exception as e:
    print('TEST 1 ERROR:', repr(e))

try:
    conn.execute('SELECT * FROM foo WHERE LOWER(A) NOT LIKE ? AND LOWER(A) NOT LIKE ?', ('%a%', '%b%'))
except Exception as e:
    print('TEST 2 ERROR:', repr(e))

try:
    conn.execute('SELECT * FROM foo WHERE "LOWER(A) NOT LIKE ?, LOWER(A) NOT LIKE ?"')
except Exception as e:
    print('TEST 3 ERROR:', repr(e))

try:
    conn.execute('SELECT * FROM foo WHERE "LOWER(A) NOT LIKE ?", "LOWER(A) NOT LIKE ?"')
except Exception as e:
    print('TEST 4 ERROR:', repr(e))

try:
    conn.execute('SELECT * FROM foo WHERE \'LOWER(A) NOT LIKE ?\', \'LOWER(A) NOT LIKE ?\'')
except Exception as e:
    print('TEST 5 ERROR:', repr(e))
