Command: /close -m

Command: /close -m [character]*
Eg: This will close all open query windows with whatever you put in front of the *.