> For the complete documentation index, see [llms.txt](https://docs.coffbox.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coffbox.com/usage-examples/order-profit-statistics.md).

# Order Profit Statistics

Calculate the total profit amount for each year based on order data.

## Sample Data

![](https://546336154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvWR9jmxX1LV6WplIPRhL%2Fuploads%2Fgit-blob-5681487c0ccc281af938828408ceaae564cdfaff%2Fcase01_01.png?alt=media)

## Prompt

> Help me calculate from the order table, how much profit each Customer made in 2014, 2015, and 2016 respectively.

## Excel Cursor Response

![](https://546336154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvWR9jmxX1LV6WplIPRhL%2Fuploads%2Fgit-blob-ec55d356c7cda627fc9e05ec5f6737cfba8ff1e3%2Fcase01_02.png?alt=media)

## Result

![](https://546336154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvWR9jmxX1LV6WplIPRhL%2Fuploads%2Fgit-blob-1693e27080c7cb0fa7397a7405900cf0cff46607%2Fcase01_03.png?alt=media)
