Learn Advanced Python3 Analyzing Hotel Databases with Python Exercise Step 14

I am on step 14 of the exercise and I am trying to use a for loop to iterate over the data. But I am struggling. Can anyone offer any assitance?

Link to Codecademy Exercise: https://www.codecademy.com/courses/learn-advanced-python/projects/analyzing-hotel-databases-with-python

# Import module 
import sqlite3
import pandas


# Task 1: Create connection object
connection = sqlite3.connect("hotel_booking.db")

# Task 2: Create cursor object
cursor = connection.cursor()

# Task 3: View first row of booking_summary
# print(cursor.execute('''SELECT * FROM booking_summary''').fetchone())

# Task 4: View first ten rows of booking_summary 
cursor.execute("SELECT * FROM booking_summary").fetchmany(10)

# Task 5: Create object bra and print first 5 rows to view data

bra = tuple(cursor.execute('''SELECT * FROM booking_summary WHERE country = 'BRA';''').fetchall())
# print(bra)
# Task 6: Create new table called bra_customers
cursor.execute('''CREATE TABLE IF NOT EXISTS bra_customers (
  num INTEGER,
  hotel TEXT,
  is_cancelled INTEGER,
  lead_time INTEGER,
  arrival_date_year INTEGER,
  arrival_date_month,
  arrival_date_day_of_month INTEGER,
  adults INTEGER,
  children INTEGER,
  country TEXT,
  adr REAL,
  special_requests INTEGER)''')

# Task 7: Insert the object bra into the table bra_customers 
cursor.executemany('''INSERT INTO bra_customers VALUES (?,?,?,?,?,?,?,?,?,?,?,?)''', bra)

# Task 8: View the first 10 rows of bra_customers
cursor.execute("SELECT * FROM bra_customers").fetchmany(10)


# Task 9: Retrieve lead_time rows where the bookings were canceled

lead_time_can = cursor.execute('''SELECT lead_time FROM bra_customers WHERE is_cancelled = 1;''').fetchall()
# print(lead_time_can)

df = pandas.read_sql_query(''' SELECT * FROM booking_summary;''', connection)

df.describe()
avg_time = df['lead_time'].mean()
print("This is average time " + str(avg_time))

# Task 10: Find average lead time for those who canceled and print results

sum = 0 
for num in lead_time_can:
  sum = sum + num[0]
print(sum)

# Task 11: Retrieve lead_time rows where the bookings were not canceled

not_cancelled = cursor.execute('''SELECT lead_time FROM bra_customers WHERE is_cancelled = 0;''').fetchall()
# Task 12: Find average lead time for those who did not cancel and print results

sum = 0 
for num in not_cancelled:
  sum = sum + num[0]
print(sum)

# Task 13: Retrieve special_requests rows where the bookings were canceled

special_requests_cancelled = cursor.execute('''SELECT special_requests FROM bra_customers WHERE is_cancelled = 1;''').fetchall()
# print(special_requests_cancelled)
# Task 14: Find total special requests for those who canceled and print results
sum = 0 
for i in special_requests_cancelled:
  sum = special_requests + special_requests[0]
  print(sum)

# Task 15: Retrieve special_requests rows where the bookings were not canceled


# Task 16: Find total speacial requests for those who did not cancel and print results


# Task 17: Commit changes and close the connection