You delete a query from the Query list as follows:
The query is removed from the Query list and its code deleted from the tab.