Hello @Priyanka210, To known how to generate SQL query from Alteryx here are the few point's go through it.
Important: If you change the SQL statement, make sure to make any necessary related changes to the Action tools as well.
Sometimes you may need records removed from a database table before adding in new records. This can be done using the Pre SQL Statement in the Input tool, which will run an SQL query before, for instance, appending new records to the table. However, what if you do not want to run the same delete statement every time? For example, let's say that you need to delete all records that match a particular date for every run?
For detailed information visit this link! https://community.alteryx.com/t5/Alteryx-Knowledge-Base/Delete-Records-Using-a-Post-SQL-Statement-Macro/ta-p/17370
I hope this will helps you!
... View more