Python Code To Insert Data Into Sql Table From Another Table