--- id: along title: along Metrics Statement sidebar_label: along keywords: - metrics - along - join description: Use the along metrics statement to control what results are joined when combining multiple metrics queries based on the value of one or more result fields. slug: /help/docs/metrics/metrics-operators/along/ canonical: https://www.sumologic.com/help/docs/metrics/metrics-operators/along/ --- import useBaseUrl from '@docusaurus/useBaseUrl'; The `along` metrics statement is useful when you join queries – it allows you to control what results are joined based on the value of one or more result fields. For more information, see [Join Metrics Queries](/docs/metrics/introduction/joins). ## Syntax ```sql [along [, , …]] ``` ## Example Queries #A and #B return the `Net_InBytes` and `Net_OutBytes` metrics with the assigned `account` and averaged over `account`. Query #C calculates the difference of the pairs of time series from #A and #B whose `account` value matches. ``` #A: metric=Net_InBytes account=* | avg by account #B: metric=Net_OutBytes account=* | avg by account #C: #B - #A along account ``` Along example