Perfect! Now let's configure the data source.

Step 2: Configure the SQL Data Source

In ReportBurster's top menu, go to:

  1. Configuration → Sales by Customer Summary
  2. On the left side, click on Report Generation

Now configure these settings:

2.1. Choose Database Connection

2.2. Configure SQL Query

SELECT
    c.CustomerID,
    c.CompanyName,
    c.ContactName,
    c.Country,
    c.City,
    COUNT(DISTINCT o.OrderID) as TotalOrders,
    SUM(od.Quantity * od.UnitPrice * (1 - od.Discount)) as TotalRevenue,
    SUM(od.Quantity * od.UnitPrice * (1 - od.Discount)) / COUNT(DISTINCT o.OrderID) as AvgOrderValue,
    SUM(o.Freight) as TotalFreight,
    MIN(o.OrderDate) as FirstOrderDate,
    MAX(o.OrderDate) as LastOrderDate
FROM Customers c
LEFT JOIN Orders o ON c.CustomerID = o.CustomerID
LEFT JOIN "Order Details" od ON o.OrderID = od.OrderID
GROUP BY c.CustomerID
ORDER BY TotalRevenue DESC

2.3. Test the Query

What the query does:

Let me know once you've pasted the query and tested it! What do you see in the preview?