Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

I only want MAX value of this, but how does it work?

$
0
0
select e.LastName, e.FirstName, sum(od.quantity * od.UnitPrice) as Omzet
from Employees e
join Orders o on e.EmployeeID = o.EmployeeID
join [Order Details] od on o.OrderID = od.OrderID
group by e.LastName, e.FirstName, year(OrderDate)
having year(o.OrderDate) = 1996
order by Omzet desc

Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>