Hi, Digital time looks more intuitive. Besides, could we rename the column from time to count in UDF? @[email protected] <[email protected]>
Thanks, ————————————————— Jialin Qiao Trevor Hart <[email protected]> 于2021年11月2日周二 上午6:09写道: > I have put my first UDTF on GitHub - https://github.com/ope-nz/iotDBExtras > > > > The first function I have developed is called UDTFDistinctCount. It > returns the distinct values (similar to IoTDB-Quality UDTFDistinct) but it > includes the count of each distinct values (as the time column). > > > > Example query; > > > > IoTDB> select distinct_count(temperature) from root.ln.wf01.wt01 > > > +-----------------------------+---------------------------------------------+ > > | > Time|distinct_count(root.ln.wf01.wt01.temperature)| > > > +-----------------------------+---------------------------------------------+ > > |1970-01-01T12:00:00.020+12:00| > 24.37| > > |1970-01-01T12:00:00.009+12:00| > 24.12| > > |1970-01-01T12:00:00.016+12:00| > 24.87| > > > +-----------------------------+---------------------------------------------+ > > > > Or as digital time; > > > > +----+---------------------------------------------+ > > > |Time|distinct_count(root.ln.wf01.wt01.temperature)| > > +----+---------------------------------------------+ > > | 20| 24.37| > > | 9| 24.12| > > | 16| 24.87| > > +----+---------------------------------------------+ > > > > > > Thanks > > Trevor Hart > > Ope Limited > > w: http://www.ope.nz/ > > m: +64212728039
