Composer configures the named queries for a business network in a source file called queries.qry
See more here -> https://hyperledger.github.io/composer/business-network/query.html
The results can be seen by running composer-rest-server after you've deployed a network with defined queries - these queries are exposed as REST API endpoints.
Check out the tutorial for an example of defining, then testing queries to see results -> https://hyperledger.github.io/composer/tutorials/queries.html
Specifically the section 'Test the Trading REST APIs and create some data'