cur.execute("""INSERT INTO football.match_events(type, player, time, game_id) VALUES (%s, %s, %s, %s)""", (etype, player_id, time, game_id))
I am completing a project where I scrape and process soccer text commentaries. This INSERT statement is part of a section of code that processes yellow cards. Unfortunately as these commentaries are updated live there are sometimes corrections (although they don't say correction so I can't filter for them). This has led me to have two rows for one booking as it appeared twice in the commentary.
I am looking for an easy way for the SQL statement to check whether all the fields in the query already exist in the table together in a single row. I hope that makes sense.