import sqlite3


def isSqlite3DB(filepath):
    """
    Returns whether file at filepath is a sqlite3 database.

    Args:
        filepath (str): The file to check.

    Returns:
        bool: Whether the database could be opened and queried.
    """
    try:
        conn = sqlite3.connect(filepath)
        conn.execute("pragma schema_version;")
    except Exception:
        return False
    conn.close()
    return True