Yes, you can do this. For example "g p > s" will group the results by priority and then sort within each priority by state (so that todo starts come before done starts).
If you tap the ? on the bar that appears above the keyboard when searching you'll find an overview of how to group and sort.
Once you've got a search that works then you can create a saved search to easily bring it up in the future.