db = sqlite3.connect('data_base')
cursor = db.execute('SELECT * FROM prices_average')
rows = cursor.fetchall()
unique_list = []
for row in rows:
if row[1:] not in [i[1:] for i in unique_list]:
unique_list.append(row)
else:
db.execute(f"""
DELETE FROM prices_average
WHERE id={row[0]}
""")
db.commit()