Skip to content
Report · Sales

Top customers by revenue (12 months)

Customers ranked by net sales over the last twelve months, with each one's share of the total.

  • ranking
  • customers
  • 12 months
Sample preview, fictional dataYour own figures appear after import.

01

About this report

Net sales over the last 365 days, rolled up to the top-level customer so sub-customers and projects count toward their parent. Net sales are invoices and cash sales less credit memos, before tax, in base currency.

Share of sales is each customer's part of the total. Last sale shows who has stopped buying. The customer name opens the customer record.

02

Sample preview

Fictional figures in the shape you will see. Yours come from your account.

CustomerTransactionsNet salesShare of salesLast sale
Harbor & Pine Co.64612,4000.182026-09-19
Brightline Dental Group41398,250.500.122026-09-12
Summit Analytics LLC37301,9800.092026-09-22
Maple Ridge Clinics29244,100.750.072026-08-30
Northgate Supply22188,7200.062026-09-03
Coastal Freightways997,3100.032026-06-14

03

The SuiteQL

This is the query each report runs. Read it, copy it, or change it after import.

Top customers by revenue (12 months)
SELECT x.customer__id,
       NVL(c.altname, c.entityid) AS customer,
       x.transactions,
       x.sales,
       x.sales / NULLIF(SUM(x.sales) OVER (), 0) AS share,
       TO_CHAR(x.last_sale, 'YYYY-MM-DD') AS last_sale
  FROM (SELECT e.toplevelparent AS customer__id,
               COUNT(DISTINCT t.id) AS transactions,
               SUM(-tl.foreignamount * t.exchangerate) AS sales,
               MAX(t.trandate) AS last_sale
          FROM transaction t
          JOIN transactionline tl ON tl.transaction = t.id
          JOIN entity e ON e.id = t.entity
         WHERE t.type IN ('CustInvc', 'CashSale', 'CustCred')
           AND t.posting = 'T'
           AND tl.mainline = 'F'
           AND tl.taxline = 'F'
           AND NVL(tl.iscogs, 'F') = 'F'
           AND tl.itemtype NOT IN ('TaxGroup', 'TaxItem', 'Subtotal', 'Description', 'EndGroup')
           AND t.trandate > TRUNC(SYSDATE) - 365
         GROUP BY e.toplevelparent) x
  JOIN entity c ON c.id = x.customer__id
 ORDER BY x.sales DESC

04

Appears in

ReportSales

Top customers by revenue (12 months)

Screenshot of the Top customers by revenue (12 months) report in HiScale Advanced Reports, filled with fictional sample data
Sample preview, fictional dataOpen image full size (opens in a new tab)