If the cursor is at the end of a query, upon pressing f9 the *next* query in the editor is run.
Example
SELECT DISTINCT runtype FROM my_table[here];
DELETE FROM my_table;
If the cursor is left between the ‘e’ and the ‘;’ at the end of the “SELECT DISTINCT runtype FROM my_table;”, the “DELETE FROM my_table;” query will run instead of the “SELECT DISTINCT runtype FROM my_table;” query.