187801a1-2d54-4825-af44-6938abc9f83d.zip (6.4 KB)
Hi balaji.ramaswamy and Kelly.
Here is the log from profiler.
Also here the version: Dremio 1.2. installed files :
- dremio-community-1.2.1-201710030121530889-8e49316
- dremio-connector-odbc-1.3.11.1034-winx64
Here is the query from AdvantureWorks database from SQL server 2012.
SELECT [ModifiedDate], [OrderDate], [DueDate], SUM([SalesOrderDetailID]) AS [agg-0-0], MAX([SalesOrderDetailID]) AS [agg-0-1], COUNT([SalesOrderDetailID]) AS [agg-0-2], MIN([SalesOrderDetailID]) AS [agg-0-3],
SUM([CustomerID]) AS [agg-11-0], MAX([CustomerID]) AS [agg-11-1], COUNT([CustomerID]) AS [agg-11-2], MIN([CustomerID]) AS [agg-11-3], SUM([SalesOrderID]) AS [agg-5-0], MAX([SalesOrderID]) AS [agg-5-1],
COUNT([SalesOrderID]) AS [agg-5-2], MIN([SalesOrderID]) AS [agg-5-3], SUM([ShipToAddressID]) AS [agg-14-0], MAX([ShipToAddressID]) AS [agg-14-1], COUNT([ShipToAddressID]) AS [agg-14-2], MIN([ShipToAddressID]) AS
[agg-14-3], SUM([BillToAddressID]) AS [agg-13-0], MAX([BillToAddressID]) AS [agg-13-1], COUNT([BillToAddressID]) AS [agg-13-2], MIN([BillToAddressID]) AS [agg-13-3], SUM([SubTotal]) AS [agg-16-0], MAX([SubTotal]) AS
[agg-16-1], COUNT([SubTotal]) AS [agg-16-2], MIN([SubTotal]) AS [agg-16-3], SUM([TotalDue]) AS [agg-19-0], MAX([TotalDue]) AS [agg-19-1], COUNT([TotalDue]) AS [agg-19-2], MIN([TotalDue]) AS [agg-19-3],
SUM([Freight]) AS [agg-18-0], MAX([Freight]) AS [agg-18-1], COUNT([Freight]) AS [agg-18-2], MIN([Freight]) AS [agg-18-3], SUM([TaxAmt]) AS [agg-17-0], MAX([TaxAmt]) AS [agg-17-1], COUNT([TaxAmt]) AS [agg-17-2],
MIN([TaxAmt]) AS [agg-17-3], SUM([LineTotal]) AS [agg-3-0], MAX([LineTotal]) AS [agg-3-1], COUNT([LineTotal]) AS [agg-3-2], MIN([LineTotal]) AS [agg-3-3], SUM([ProductID]) AS [agg-20-0], MAX([ProductID]) AS
[agg-20-1], COUNT([ProductID]) AS [agg-20-2], MIN([ProductID]) AS [agg-20-3], SUM([Weight]) AS [agg-32-0], MAX([Weight]) AS [agg-32-1], COUNT([Weight]) AS [agg-32-2], MIN([Weight]) AS [agg-32-3], SUM([UnitPrice]) AS
[agg-2-0], MAX([UnitPrice]) AS [agg-2-1], COUNT([UnitPrice]) AS [agg-2-2], MIN([UnitPrice]) AS [agg-2-3], SUM([OrderQty]) AS [agg-1-0], MAX([OrderQty]) AS [agg-1-1], COUNT([OrderQty]) AS [agg-1-2], MIN([OrderQty]) AS [agg-1-3], SUM([StandardCost]) AS [agg-27-0], MAX([StandardCost]) AS [agg-27-1], COUNT([StandardCost]) AS [agg-27-2], MIN([StandardCost]) AS [agg-27-3], SUM([ListPrice]) AS [agg-28-0], MAX([ListPrice]) AS [agg-28-1], COUNT([ListPrice]) AS [agg-28-2], MIN([ListPrice]) AS [agg-28-3], SUM([ProductModelID]) AS [agg-37-0], MAX([ProductModelID]) AS [agg-37-1], COUNT([ProductModelID]) AS [agg-37-2], MIN([ProductModelID]) AS [agg-37-3], SUM([SalesPersonID]) AS [agg-12-0], MAX([SalesPersonID]) AS [agg-12-1], COUNT([SalesPersonID]) AS [agg-12-2], MIN([SalesPersonID]) AS [agg-12-3], SUM([SalesLastYear]) AS [agg-46-0], MAX([SalesLastYear]) AS [agg-46-1], COUNT([SalesLastYear]) AS [agg-46-2], MIN([SalesLastYear]) AS [agg-46-3], SUM([SalesYTD]) AS [agg-45-0], MAX([SalesYTD]) AS [agg-45-1], COUNT([SalesYTD]) AS [agg-45-2], MIN([SalesYTD]) AS [agg-45-3], SUM([DaysToManufacture]) AS [agg-33-0], MAX([DaysToManufacture]) AS [agg-33-1], COUNT([DaysToManufacture]) AS [agg-33-2], MIN([DaysToManufacture]) AS [agg-33-3], SUM([ReorderPoint]) AS [agg-26-0], MAX([ReorderPoint]) AS [agg-26-1], COUNT([ReorderPoint]) AS [agg-26-2], MIN([ReorderPoint]) AS [agg-26-3], SUM([SafetyStockLevel]) AS [agg-25-0], MAX([SafetyStockLevel]) AS [agg-25-1], COUNT([SafetyStockLevel]) AS [agg-25-2], MIN([SafetyStockLevel]) AS [agg-25-3], SUM([ShipMethodID]) AS [agg-15-0], MAX([ShipMethodID]) AS [agg-15-1], COUNT([ShipMethodID]) AS [agg-15-2], MIN([ShipMethodID]) AS [agg-15-3], SUM([Status]) AS [agg-9-0], MAX([Status]) AS [agg-9-1], COUNT([Status]) AS [agg-9-2], MIN([Status]) AS [agg-9-3], COUNT([$f28]) AS [CONVERT_COUNT_STAR]
FROM (SELECT CAST([t2].[ModifiedDate] AS DATE) AS [ModifiedDate], CAST([t2].[OrderDate] AS DATE) AS [OrderDate], CAST([t2].[DueDate] AS DATE) AS [DueDate], [t2].[SalesOrderDetailID], [t2].[OrderQty], [t2].[UnitPrice], [t2].[LineTotal], [t2].[SalesOrderID], [t2].[Status], [t2].[CustomerID], [t2].[SalesPersonID], [t2].[BillToAddressID], [t2].[ShipToAddressID], [t2].[ShipMethodID], [t2].[SubTotal], [t2].[TaxAmt], [t2].[Freight], [t2].[TotalDue], [t2].[ProductID], [t2].[SafetyStockLevel], [t2].[ReorderPoint], [t2].[StandardCost], [t2].[ListPrice], [t2].[Weight], [t2].[DaysToManufacture], [t2].[ProductModelID], [SalesTerritory].[SalesYTD], [SalesTerritory].[SalesLastYear], 1 AS [$f28]
FROM (SELECT [t1].[SalesOrderDetailID], [t1].[OrderQty], [t1].[UnitPrice], [t1].[LineTotal], [t1].[ModifiedDate], [t1].[SalesOrderID], [t1].[OrderDate], [t1].[DueDate], [t1].[ShipDate], [t1].[Status], [t1].[OnlineOrderFlag], [t1].[CustomerID], [t1].[SalesPersonID], [t1].[TerritoryID], [t1].[BillToAddressID], [t1].[ShipToAddressID], [t1].[ShipMethodID], [t1].[SubTotal], [t1].[TaxAmt], [t1].[Freight], [t1].[TotalDue], [t1].[ProductID], [t1].[Name], [t1].[MakeFlag], [t1].[FinishedGoodsFlag], [t1].[Color], [t1].[SafetyStockLevel], [t1].[ReorderPoint], [t1].[StandardCost], [t1].[ListPrice], [t1].[Size], [t1].[SizeUnitMeasureCode], [t1].[WeightUnitMeasureCode], [t1].[Weight], [t1].[DaysToManufacture], [t1].[ProductLine], [t1].[Class], [t1].[Style], [t1].[ProductModelID], [t1].[SellStartDate], [t1].[SellEndDate], [t1].[Product Category Name] AS [Product Sub Category Name], [ProductCategory].[Name] AS [Product Category Name]
FROM (SELECT [t0].[SalesOrderDetailID], [t0].[OrderQty], [t0].[UnitPrice], [t0].[LineTotal], [t0].[ModifiedDate], [t0].[SalesOrderID], [t0].[OrderDate], [t0].[DueDate], [t0].[ShipDate], [t0].[Status], [t0].[OnlineOrderFlag], [t0].[CustomerID], [t0].[SalesPersonID], [t0].[TerritoryID], [t0].[BillToAddressID], [t0].[ShipToAddressID], [t0].[ShipMethodID], [t0].[SubTotal], [t0].[TaxAmt], [t0].[Freight], [t0].[TotalDue], [t0].[ProductID], [t0].[Name], [t0].[MakeFlag], [t0].[FinishedGoodsFlag], [t0].[Color], [t0].[SafetyStockLevel], [t0].[ReorderPoint], [t0].[StandardCost], [t0].[ListPrice], [t0].[Size], [t0].[SizeUnitMeasureCode], [t0].[WeightUnitMeasureCode], [t0].[Weight], [t0].[DaysToManufacture], [t0].[ProductLine], [t0].[Class], [t0].[Style], [t0].[ProductModelID], [t0].[SellStartDate], [t0].[SellEndDate], [t0].[ProductSubcategoryID], [ProductSubcategory].[ProductCategoryID], [ProductSubcategory].[Name] AS [Product Category Name]
FROM (SELECT [t].[SalesOrderDetailID], [t].[OrderQty], [t].[UnitPrice], [t].[LineTotal], [t].[ModifiedDate], [t].[SalesOrderID], [t].[OrderDate], [t].[DueDate], [t].[ShipDate], [t].[Status], [t].[OnlineOrderFlag], [t].[CustomerID], [t].[SalesPersonID], [t].[TerritoryID], [t].[BillToAddressID], [t].[ShipToAddressID], [t].[ShipMethodID], [t].[SubTotal], [t].[TaxAmt], [t].[Freight], [t].[TotalDue], [t].[ProductID], [Product].[Name], [Product].[MakeFlag], [Product].[FinishedGoodsFlag], [Product].[Color], [Product].[SafetyStockLevel], [Product].[ReorderPoint], [Product].[StandardCost], [Product].[ListPrice], [Product].[Size], [Product].[SizeUnitMeasureCode], [Product].[WeightUnitMeasureCode], [Product].[Weight], [Product].[DaysToManufacture], [Product].[ProductLine], [Product].[Class], [Product].[Style], [Product].[ProductSubcategoryID], [Product].[ProductModelID], [Product].[SellStartDate], [Product].[SellEndDate]
FROM (SELECT [SalesOrderDetail].[SalesOrderDetailID], [SalesOrderDetail].[OrderQty], [SalesOrderDetail].[ProductID], [SalesOrderDetail].[UnitPrice], [SalesOrderDetail].[LineTotal], [SalesOrderDetail].[ModifiedDate], [SalesOrderDetail].[SalesOrderID], [SalesOrderHeader].[OrderDate], [SalesOrderHeader].[DueDate], [SalesOrderHeader].[ShipDate], [SalesOrderHeader].[Status], [SalesOrderHeader].[OnlineOrderFlag], [SalesOrderHeader].[CustomerID], [SalesOrderHeader].[SalesPersonID], [SalesOrderHeader].[TerritoryID], [SalesOrderHeader].[BillToAddressID], [SalesOrderHeader].[ShipToAddressID], [SalesOrderHeader].[ShipMethodID], [SalesOrderHeader].[SubTotal], [SalesOrderHeader].[TaxAmt], [SalesOrderHeader].[Freight], [SalesOrderHeader].[TotalDue]
FROM [AdventureWorks2012_Data].[Sales].[SalesOrderDetail]
INNER JOIN [AdventureWorks2012_Data].[Sales].[SalesOrderHeader] ON [SalesOrderDetail].[SalesOrderID] = [SalesOrderHeader].[SalesOrderID]) AS [t]
FULL JOIN [AdventureWorks2012_Data].[Production].[Product] ON [t].[ProductID] = [Product].[ProductID]) AS [t0]
INNER JOIN [AdventureWorks2012_Data].[Production].[ProductSubcategory] ON [t0].[ProductSubcategoryID] = [ProductSubcategory].[ProductSubcategoryID]) AS [t1]
INNER JOIN [AdventureWorks2012_Data].[Production].[ProductCategory] ON [t1].[ProductCategoryID] = [ProductCategory].[ProductCategoryID]) AS [t2]
INNER JOIN [AdventureWorks2012_Data].[Sales].[SalesTerritory] ON [t2].[TerritoryID] = [SalesTerritory].[TerritoryID]) AS [t3]
GROUP BY [ModifiedDate], [OrderDate], [DueDate]
Please let me know if you would need anything else.
Thanks,
Nabil