def query(querystr, connection=None, **connectkwargs):
    """Execute a query of the given SQL database
    """
    if connection is None:
        connection = connect(**connectkwargs)
    cursor = connection.cursor()
    cursor.execute(querystr)
    return cursor.fetchall()