Can we use Common Table Expressions (CTE) in Bold BI SQL query editor?

I want to use a CTE in the SQL query editor in Bold BI. Is this supported, and how should it be structured? 


1 Reply

PP Poojasri Perumal Syncfusion Team November 14, 2025 08:12 AM UTC

Yes, Common Table Expressions (CTEs) are supported in the Bold BI®® SQL query editor. Here's a sample query you can use: 

WITH OrderSummary AS ( 
    SELECT 
        CustomerID, 
        COUNT(OrderID) AS TotalOrders 
    FROM Orders 
    GROUP BY CustomerID 
) 
SELECT TOP 100 
    CustomerID, 
    TotalOrders 
FROM OrderSummary 

  • The CTE OrderSummary calculates the total number of orders per customer. 
  • The main query retrieves the top 100 results from this summary. 
  • The TOP 100 clause is used to comply with Bold BI®’s restrictions on ORDER BY in SQL Server code view 

Live mode  

Extract mode  



Note: For live mode, use direct table names. For extract mode, use GUID names. 


Loader.
Up arrow icon