shuitai opened a new issue, #10872:
URL: https://github.com/apache/pinot/issues/10872

   I find the doc link 
https://docs.pinot.apache.org/users/user-guide-query/gap-fill-functions
   In section: Aggregation/Gapfill/Aggregation
   
   The query supports subquery or nested sql, which means pinot support nested 
sql now?
   
   SELECT time_col, SUM(status) AS occupied_slots_count
   FROM (
       SELECT GAPFILL(time_col,'1:MILLISECONDS:SIMPLE_DATE_FORMAT:yyyy-MM-dd 
HH:mm:ss.SSS','2021-10-01 09:00:00.000',
                      '2021-10-01 12:00:00.000','30:MINUTES', FILL(status, 
'FILL_PREVIOUS_VALUE'),
                       TIMESERIESON(lotId)), lotId, status
       FROM (
           SELECT DATETIMECONVERT(event_time,'1:MILLISECONDS:EPOCH',
                  '1:MILLISECONDS:SIMPLE_DATE_FORMAT:yyyy-MM-dd 
HH:mm:ss.SSS','30:MINUTES') AS time_col,
                  lotId, lastWithTime(is_occupied, event_time, 'INT') AS status
           FROM parking_data
           WHERE event_time >= 1633078800000 AND  event_time <= 1633089600000
           GROUP BY 1, 2
           ORDER BY 1
           LIMIT 100)
       LIMIT 100)
   GROUP BY 1
   LIMIT 100
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to