input: Write a function to select all rows from a table where the 'status' is 'approved'. The function should execute the SQL query, fetch the results, and return them. Make sure to provide the necessary cursor object.
  
  def select_approved_rows():
     sql = "SELECT * FROM table WHERE status = 'approved'"
     cur.execute(sql)
     return cur.fetchall()
  
  assert select_approved_rows(['approved', 'pending', 'approved'])==['approved', 'approved']
  assert select_approved_rows(['pending', 'pending', 'pending'])==[]
  assert select_approved_rows(['approved'])==['approved']
  assert select_approved_rows([])==[]
output: def select_approved_rows():
      sql = "SELECT * FROM table WHERE status = 'approved'"
      cur.execute(sql)
      return cur.fetchall()