ASPForums.Net RSS Feed additions to the content that appears on ASPForums.Net(c) 2019 All rights reserved.Select sum and count using Join in SQL Server<p>Hi <a class="username" rel="telldurges"> telldurges</a>,</p> <p>Refer below sample.</p> <p><span style="text-decoration: underline;"><strong>Database</strong></span></p> <p>For this sample I have used of NorthWind database that you can download using the link given below.</p> <p><a href="" target="_blank">Download Northwind Database</a></p> <p><span style="text-decoration: underline;"><strong>SQL</strong></span></p> <pre class="brush: sql">SELECT COUNT(emp.EmployeeID) EmployeeID, ord.ShipCountry,ord.ShipCity, SUM(ord.Freight) Freight FROM Orders ord INNER JOIN Employees emp ON emp.EmployeeID = ord.EmployeeID GROUP BY ord.ShipCountry,ord.ShipCity</pre> <p>&nbsp;</p>, 12 Jun 2019 06:26:40 GMT