nth_value from seen as a syntax error

2nd max salary in sql
/* Formatted on 22/06/2017 13:07:39 (QP5 v5.312) */
SELECT DISTINCT NTH_VALUE (sal, 2 from last) over() from emp;
The formater doesn’t like my FROM LAST. Which is a valid syntax.

I can confirm that problem on Toad 12.10 x64 on x64 client