Hi
I would like to find out how I can do a count distinct on a field where some other field match the condition.
In SQL I do run the below code and I do get the result I want.
SELECT COUNT(Distinct RevisionNumber)
FROM table 1
WHERE Week = 1711
Hi
I would like to find out how I can do a count distinct on a field where some other field match the condition.
In SQL I do run the below code and I do get the result I want.
SELECT COUNT(Distinct RevisionNumber)
FROM table 1
WHERE Week = 1711
What you want is the cardinality aggregation. See this page in our definitive guide for another example
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.