First, let's make our anonymous execution file. For this, click outside the classes folder
Make a new file named
anon.apex and write your SOQL Query without
Now select the line and in your command palette, search for
SFDX: Execute SOQL Query with Currently Selected Text
output window, you will now have your results!