This is by design. The summaries in front end queries are calculated "on-the-fly" with the use of built-in RE functions and these are not exposed in the API. Hence, you will not be able to extract the SQL for RE queries that involve summary fields in the criteria or output. You can however, still view the SQL and functions used in the front end.

How to view SQL generated by a query in The Raiser's Edge