@Klearner unfortunately we don't have built-in upserts with Google Sheets at the moment (this is largely due to the Sheets API itself not supporting them).
If you'd like to check for duplicates you'll need to pull the full column from your sheet and manually check for duplicates in the frontend. This can be doable if the number of rows you're checking against is relatively small.
You can try something like the following:
const skus = formatDataAsObject(yourSheetsQuery.data).SKU;
const rowsToInsert = fileButton1.parsedValue[0].filter(row => !skus.includes(row.SKU));
yourInsertQuery.trigger({additionalScope: {inserts: rowsToInsert} });
The above uses additionalScope to also trigger the insert query but that isn't strictly necessary. You could have it just return the rows you want to pass to each query or a separate transformer to do the filtering. You can also pass the value directly to the insert query using something like this!
{{ fileButton1.parsedValue[0].filter(row => !formatDataAsObject(yourSheetsQuery.data).SKU.includes(row.SKU)) }}
Any way you choose, though, you'll need to pull those SKU values into Retool first.
Does that help?
Let me know if it raises any questions as well!