1

I used the following script to delete duplicate records from the query result in DolphinDB where 'quotes' is a distributed table with 2 partitioning columns 'date' and 'symbol'.

select * from quotes where date=2020.12.10 and isDuplicated([date, time, symbol]) = false; 

The error messsage:

The where clause [date == 2020.12.10 and isDuplicated([ date, time, symbol ]) == 0] of a distributed/partitioned sql shouldn't use any aggregate or sequential function.

Does anyone know what to do with this?

ftsd
  • 21
  • 3

1 Answers1

0

To use order sensitive functions such as isDuplicated in the where clause of a DolphinDB SQL query across multiple partitions in a distributed table, you need to use the keyword "map" at the end of the query:

select * from quotes where date=2020.12.10 and isDuplicated([date, time, symbol]) = false map;
Bob
  • 137
  • 2
  • 9