To view the query, you need to switch on ‘Debug’:
Then, you’ll be able to copy the query if you run the action file:
This doesn’t seem to work for all queries (eg not for paged queries, as far as I know). Also, you will see variables as in the example above - so you can’t simply paste the query somewhere and run the query.
If you want to copy/paste a query as it’s actually executed, you may be able to set this up - depending on your development setup. I use WAMP on a local machine, so I can see the MySQL query log and see exactly what queries are executed (and copy/paste them etc.). Very useful for debugging.