I'm trying to insert into a table. This is the code I made:
cursor=connection.cursor()
cursor.execute('INSERT INTO TopOperadores (imsi_pref_top,descarga_top,transferencia_top) VALUES (SELECT imsi_num, AVG(descarga), AVG(transferencia) FROM Trafico_de_Datos group by nomb_oper)')
This is the error:
syntax error at or near "SELECT" LINE 1: ..._ pref_top, download_top, transfer_top) VALUES (SELECT ims ...