קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
תוצאות הזמנה
אפשר לציין את סדר השורות בתשובה באמצעות הסעיף ORDER BY,
שמורכב מרצף אחד או יותר שמופרדים בפסיקים של:
FieldName ('ASC' | 'DESC')?
אם לא מציינים את הערך ASC או DESC אחרי שם של שדה, הכלי Reporting API
ברירת המחדל היא ASC.
סעיף ORDER BY הבא ממיין דוח ביצועים בסדר יורד
חשיפות ומזהי מוצרים בסדר עולה:
ORDER BY metrics.impressions DESC, segments.offer_id ASC
אי אפשר להשתמש במדד ORDER BY במדדים שלא נבחרו או בפלחים שלא נבחרו.
הגבלת מספר התוצאות
אפשר להגביל את המספר הכולל של התוצאות שהוחזרו באמצעות הסעיף LIMIT.
בשילוב עם סידור התוצאות, אפשר ליצור את הערך N דוחות, כמו
דוח שמוצגים בו חמשת המוצרים עם מספר החשיפות הגבוה ביותר בתקופה האחרונה
30 ימים:
דוגמה
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;
אי אפשר לסנן (סעיף WHERE) של מדדים בלי לבחור אותם.
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 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"]]