def populate_table(conn, sql, rows):
    """ insert multiple rows of data into a table
    :param conn: Connection object
    :param sql: INSERT INTO statement
    :param rows: the data as a list of rows
    :return: lastrowid
    """
    cur = conn.cursor()
    cur.executemany(sql, rows)
    conn.commit()
    return cur.lastrowid