Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Risultati degli ordini
Puoi specificare l'ordine delle righe nella risposta utilizzando la clausola ORDER BY.
che è costituita da una o più sequenze separate da virgole di:
FieldName ('ASC' | 'DESC')?
Se non specifichi ASC o DESC dopo il nome di un campo, l'API di reporting
il valore predefinito è ASC.
La seguente clausola ORDER BY ordina un report sul rendimento in ordine decrescente
impressioni e ID offerta prodotto in ordine crescente:
ORDER BY metrics.impressions DESC, segments.offer_id ASC
ORDER BY non è consentito su metriche non selezionate o segmenti non selezionati.
Limita il numero di risultati
Puoi limitare il numero totale di risultati restituiti utilizzando la clausola LIMIT.
Combinando questa query con l'ordinamento dei risultati, puoi ottenere "primi N" report, come un
contenente i cinque prodotti con il maggior numero di impressioni negli ultimi
30 giorni:
Esempio
SELECT
segments.offer_id,
metrics.impressions
FROM MerchantPerformanceView
WHERE segments.date BETWEEN '2020-12-01' AND '2020-12-31'
ORDER BY metrics.impressions DESC
LIMIT 5;
L'applicazione di filtri (clausola WHERE) non è consentita per le metriche senza selezionarle.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2024-09-20 UTC."],[[["The Merchant API is the new version of the Content API for Shopping and represents the future of product data integration."],["You can order results with the `ORDER BY` clause using fields and `ASC` or `DESC` for ascending or descending order respectively."],["The `LIMIT` clause enables you to specify the maximum number of returned results and can be combined with `ORDER BY` to generate \"top N\" reports."],["While a query's maximum result limit is 1000 rows, pagination with `pageToken` is necessary for retrieving additional results beyond this limit."],["Filtering using the `WHERE` clause on metrics necessitates their selection in the query."]]],["The Merchant API beta, a new version of the Content API for Shopping, is introduced. You can order response rows using the `ORDER BY` clause with `ASC` or `DESC` order for selected fields. The `LIMIT` clause restricts the total results, enabling \"top N\" reports. `ORDER BY` is limited to selected fields, and filtering (`WHERE`) is not available for metrics that aren't selected. The maximum number of rows returned is 1000, requiring pagination for more results.\n"]]