The SELECT xh, yf, round (sum (jye)/30, 2), row_number () OVER (PARTITION BY yf, xh ORDER BY round (sum (jye)/30, 2), xh, yf desc) e FROM t_ykt_xfjl_xsjc) t
Where e & lt;=100
This statement shows error

Pray god to help solve it
CodePudding user response:
The ORDER BY round (sum (jye)/30, 2)Order by content can't be aggregated content, if want to sort, on the outside of the aggregate function
CodePudding user response:
After the from t, increase group by xh, xf