I'm using Oracle SQL Developer, when I run this query it gets me this error even the table and the field exists:
Select Pais.id_pais, Pais.nombre, TOTAL
from(
SELECT Pais.id_pais, SUM( P.precio * Orden.cantidad) AS TOTAL
FROM Producto P
JOIN Orden ON Orden.id_producto = P.id_producto
JOIN Vendedor ON Vendedor.id_orden = Orden.id_vendedor
JOIN Pais ON Pais.id_pais = Vendedor.id_pais
GROUP BY Pais.id_pais
) Orden
JOIN Vendedor ON Vendedor.id_orden = Orden.id_vendedor
JOIN Pais ON Pais.id_pais = Vendedor.id_pais
ORDER BY TOTAL DESC
FETCH NEXT 1 ROWS ONLY;
enterORA-00904: "VENDEDOR"."ID_ORDEN": invalid identifier 00904. 00000 - "%s: invalid identifier" *Cause: *Action: Error en la linw: 6, column: 26