Código SQL:
Ver original
SELECT top 25 orders.orderid AS id,customers.companyname AS cliente,employees.firstname AS vendedor,shippers.companyname AS via_entrega,orders.orderdate AS fecha_compra,orders.freight AS valor_compra FROM Orders INNER JOIN customers ON orders.customerid = customers.customerid INNER JOIN employees ON orders.employeeid = employees.employeeid INNER JOIN shippers ON orders.shipvia = shippers.shipperid
El resultado es el deseado, pero si uso max para sacar cual es el la compra de maximo valor o minimo no me la da, ya he probado de muchas formas y pos no me sale
Código SQL:
Ver original
SELECT top 25 orders.orderid AS id,customers.companyname AS cliente,employees.firstname AS vendedor,shippers.companyname AS via_entrega,orders.orderdate AS fecha_compra,MAX (orders.freight AS valor_compra) FROM Orders INNER JOIN customers ON orders.customerid = customers.customerid INNER JOIN employees ON orders.employeeid = employees.employeeid INNER JOIN shippers ON orders.shipvia = shippers.shipperid
Sera que estoy usando mal el termino ?? lo he usado de otras formas asi como sale en los manuales y no sale, alguien me ayuda por fissss