Please let me know what you find, but to clarify, the code works for the following GAQL query (All results are returned, and match the results in the UI):
SELECT
campaign_search_term_insight.category_label,
metrics.clicks,
metrics.impressions,
metrics.conversions,
metrics.conversions_value
FROM
campaign_search_term_insight
WHERE
segments.date DURING LAST_7_DAYS
AND campaign_search_term_insight.campaign_id ='
19548801299'
ORDER BY
metrics.impressions ASC
Similarly, the code works for the following query (change highlighted in yellow) - a single result from the previous query is returned:
SELECT
campaign_search_term_insight.category_label,
metrics.clicks,
metrics.impressions,
metrics.conversions,
metrics.conversions_value
FROM
campaign_search_term_insight
WHERE
segments.date DURING LAST_7_DAYS
However, the internal error is generated when the query is modified into the following:
SELECT
campaign_search_term_insight.category_label,
segments.date,
segments.search_subcategory,
segments.search_term,
metrics.clicks,
metrics.impressions,
metrics.conversions,
metrics.conversions_value
FROM
campaign_search_term_insight
WHERE
segments.date DURING LAST_7_DAYS
There seems to be no issue with the logic of the query, or the code.
Thanks,
Moshik