In a table I have flows and runs

for every flow i have to keep the row with max runs delete remaining all. This has to be done of all flows.

Using single statement.

I tried to use cte, rank but getting error. 

I tried to group by flows and then apply rank for the group and then delete rows which are > 1.

```

WITH cte AS 

( SELECT flow, RANK() OVER 

       (PARTITION BY flow ORDER BY runs) 

AS rank FROM TEST_RESULTS_TABLE GROUP BY flow )

DELETE FROM cte WHERE rank >1 ;

this is giving :

ORA-00928: missing SELECT keyword
00928. 00000 -  "missing SELECT keyword"
*Cause:    
*Action:
Error at Line: 25 Column: 153

```