there are two tables named 'production.product' and 'sales.sales order detail' they should be joined with inner-join model: SELECT SO.ProductID,P.NAME, MAX(ORDERQTY) FROM Sales.SalesOrderDetail SO INNER JOIN PRODUCTION.PRODUCT P ON SO.PRODUCTID=P.PRODUCTID GO NOW THERE IS A PROBLEM: I dont know how to use MAX FUNCTION with GROUP BY in an inner join would you please help me to write the correct syntax? |
↧
how can I use aggregate functions in an inner join model?
↧