If your query has resulted in an infinite loop (yup, not everyone is a great programmer), you will need to stop the execution of the program. First of all, you need to interrupt the execution of the program by pressing the command key (bottom left corner of keyboard), and the full stop key - at the same time. A dialog will appear indicating that the program is now interrupted. You can then stop program execution by clicking the appropriate button in the dialog box.