Can i get count(distinct user_id) value after group by date hiving min(date)>1539878295000?

SQL as follow:
select count(distinct date) from
select min(date) from table_name
group by user_id
having min(date) >1539878295000

If you refer to Elasticsearch SQL here, then no, this type of sub-select is not supported. Only the simple SELECT * FROM (SELECT * FROM ....) types of queries are supported. More complex queries involving HAVING or GROUP BY are, in general, not supported with sub-selects.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.