Best-practice samples for common queries
Here are best-practice samples for common queries, including retrieving subscriptions, products, accounts, attachments, and invoices.
See the following samples of best practices for some common use cases.
-
Get a list of
Subscriptionsand the associatedAccountswhose custom fieldgeographicregion__cisWest -
Get the
Productsupdated since January 1, 2019 -
Get the
Accountswith Usage for theProductswith specified SKUs -
Get
Attachmentsfor the object by specifying the associated object ID and associated object type in WHERE clause -
Get a list of
Invoiceswhose invoice due date is later than the date of current UTC in Los Angeles time zone. For more information about thedatefunction, see Get the date value of a timestamp.