Queries are made of SQL statements, go take a look on some tutorials on how to write SQL.
An example of the 2 queries are below, let say move from table A to B. The first one is copying the records from A to B, then the second one will delete the records in A.
- INSERT INTO TableB
-
SELECT TableA.*
-
FROM TableA
-
HAVING STATUS = 'completed';
-
- DELETE TableA.*
-
FROM TableA
-
HAVING STATUS = 'completed';
-
Then for the macro you'll simple select the action of OpenQuery and select the 2 queries in order, and ending it by selecting the StopMacro action.