Software Development
Member Avatar
SELECT SUM([BTL].dbo.OrderTable.Quantity) AS 'Totalquentity',Count(BTL.dbo.OrderTable.OrderID) as TotalOrder

            FROM [BTL].dbo.OrderTable
            JOIN [BTL].dbo.Products
            ON [BTL].dbo.OrderTable.ProductID=[BTL].dbo.Products.ProductID
            Left JOIN [BTL].dbo.Brand
            ON [BTL].dbo.Products.BrandID=[BTL].dbo.Brand.BrandID  
            WHERE  [BTL].dbo.OrderTable.EmployeeID='1' 
            Group by [BTL].dbo.Brand.BrandName,[BTL].dbo.Brand.BrandID"

            I Want to get avg
Software Development
Member Avatar
SELECT SUM([BTL].dbo.OrderTable.Quantity) AS 'Totalquentity',Count(BTL.dbo.OrderTable.OrderID) as TotalOrder

            FROM [BTL].dbo.OrderTable
            JOIN [BTL].dbo.Products
            ON [BTL].dbo.OrderTable.ProductID=[BTL].dbo.Products.ProductID
            Left JOIN [BTL].dbo.Brand
            ON [BTL].dbo.Products.BrandID=[BTL].dbo.Brand.BrandID  
            WHERE  [BTL].dbo.OrderTable.EmployeeID='1' 
            Group by [BTL].dbo.Brand.BrandName,[BTL].dbo.Brand.BrandID"

            I Want to get avg
Software Development
Member Avatar
SELECT SUM([BTL].dbo.OrderTable.Quantity) AS 'Totalquentity',Count(BTL.dbo.OrderTable.OrderID) as TotalOrder

            FROM [BTL].dbo.OrderTable
            JOIN [BTL].dbo.Products
            ON [BTL].dbo.OrderTable.ProductID=[BTL].dbo.Products.ProductID
            Left JOIN [BTL].dbo.Brand
            ON [BTL].dbo.Products.BrandID=[BTL].dbo.Brand.BrandID  
            WHERE  [BTL].dbo.OrderTable.EmployeeID='1' 
            Group by [BTL].dbo.Brand.BrandName,[BTL].dbo.Brand.BrandID"

            I Want to get avg