# How Sigma works Learn what you can do with Sigma. Sigma 中的可用数据是只读的。查询不能修改现有数据或创建新交易。 [Sigma](https://dashboard.stripe.com/sigma/queries) provides an interactive SQL environment in the Stripe Dashboard for querying your transactional data. Use Sigma to create custom financial reports for accounting and reconciliation, build reports from pre-configured templates, and track key metrics. All data is read-only and includes information about payments, subscriptions, customers, payouts, and so on. ## Try Sigma for free in sandboxes Sigma is free to use in [sandboxes](https://docs.stripe.com/sandboxes.md), with no usage limits. You can run unlimited queries against your test data at no cost. Activities in sandboxes don’t count toward your charge-based entitlement and don’t incur any fees. Use sandboxes to explore Sigma’s capabilities before committing to a paid plan. ## 创建自定义报告 Reports give you the data required for your accounting and reconciliation workflows. To create a report, query the assistant or write your own report with SQL. The reports you generate can differ from those you generate in the Stripe Dashboard in the following ways: - **数据可用性:**对于财务报告,您可以通过选择**本月至今**或打开日期选择器日历来查找可用数据的最近日期。在 Sigma 中,`data_load_time` 参数提供数据可用期间的时间戳。 - \**时区:**Stripe 管理平台中的财务报告默认按当地时区筛选报告,但您可以切换为使用 UTC 时区。Sigma 按 UTC 时区筛选模板。 - \**日期范围:**为 Stripe 管理平台财务报告选择的日期范围,例如 1 月 13 日至 1 月 14 日,会筛选从 1 月 13 日 00:00:00 到 1 月 14 日 23:59:59 的报告。为 Sigma 模板选择的 1 月 13 日至 1 月 14 日的日期范围筛选会筛选从 1 月 13 日 00:00:00 到 1 月 13 日 23:59:59 的报告。 - \**货币:**Stripe 管理平台中的财务报告始终以单一货币筛选数据。默认情况下,Sigma 报告模板返回所有货币。您可以向 Sigma 查询中添加一个 `WHERE` 子句,将结果限制为单一货币。 - \**元数据:**财务报告允许您包含元数据。Sigma 模板不包含元数据。您可以按照 `Metadata to column` 模板将元数据添加到您的报告中。 Reports follow the same availability rules as the Stripe Dashboard. Payout Reconciliation reports are only available for users with the **Automatic payouts** setting enabled, and Connect variants of reports are only available for users on [Stripe Connect](https://docs.stripe.com/connect.md). ### 报告模板 您还可以用[模板](https://docs.stripe.com/stripe-data/write-queries.md#templates)创建报告。默认情况下,这些报告在所有数据可用的最后一个完整月份运行。要更改日期,请复制模板并编辑报告日期间隔。使用列出的模板生成相关报告及其关联的变体: | 报告组 | Sigma 模板名称 | API 报告类型 | | --------------------------------------------- | -------------------------------------------- | ----------------------------------------- | | **余额报告** | Itemized balance change from activity report | `balance_change_from_activity.itemized.3` | | 分项提现 | `payouts.itemized.3` | | **提现对账报告** | Detailed payout reconciliation | `payout_reconciliation.itemized.5` | | Itemized ending balance reconciliation report | `ending_balance_reconciliation.itemized.4` | ## 创建和管理指标 从您的 Sigma 报告创建指标,并将其组织成[指标组](https://dashboard.stripe.com/custom-metrics),以监控您每天最重要的指标。编辑您的指标的 [Sigma 图表](https://docs.stripe.com/stripe-data/write-queries.md#view-download-query-results),以自定义指标预览。未启用图表的指标组会显示报告中的行数。 ![演示 Sigma 自定义报告组](https://b.stripecdn.com/docs-statics-srv/assets/custom-reports.537d49b1fa1765a58d7237cf251d4a01.png) 您在所有指标组中最多可以添加总共 20 个 Sigma 报告。只有指标组的作者可以编辑或删除该指标组。删除指标组不会影响该组中的报告。 ## 取消 Sigma 订阅 如果您当前有有效的 Sigma 订阅并且想要取消它,请前往您的 [Sigma 设置](https://dashboard.stripe.com/settings/sigma)并点击**取消 Stripe Sigma 订阅**。您可以继续使用 Sigma,直到计费周期结束,此时订阅会结束。 ## See also - [查询交易数据](https://docs.stripe.com/stripe-data/query-transactions.md) - [查询 Billing 数据](https://docs.stripe.com/stripe-data/query-billing-data.md) - [Query connected account data](https://docs.stripe.com/stripe-data/query-connect-data.md) - [查询所有费用数据](https://docs.stripe.com/stripe-data/query-all-fees-data.md)