[PATCH v2 1/3] sc: Add support for the 'query' command.