Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DISTINCT error with 0.9rc6 #1804

Closed
misja opened this issue Mar 2, 2015 · 2 comments
Closed

DISTINCT error with 0.9rc6 #1804

misja opened this issue Mar 2, 2015 · 2 comments

Comments

@misja
Copy link

misja commented Mar 2, 2015

I'm getting errors when using DISTINCT in 0.9 rc6:

printf "creating database\n"
curl -G http://localhost:8086/query --data-urlencode "q=CREATE DATABASE dtest"

printf "creating retention policy\n"
curl -G http://localhost:8086/query --data-urlencode "q=CREATE RETENTION POLICY drp ON dtest DURATION 365d REPLICATION 1 DEFAULT"

printf "inserting data\n"
curl -d '{"database" : "dtest", "retentionPolicy" : "drp", "points": [{"name": "events","tags": {"site": "1"},"fields": {"token": "aa"}},{"name": "events","tags": {"site": "2"},"fields": {"token": "aa"}},{"name": "events","tags": {"site": "1"},"fields": {"token": "bb"}},{"name": "events","tags": {"site": "2"},"fields": {"token": "aa"}}]}' -H "Content-Type: application/json" http://localhost:8086/write

printf "\nSHOW MEASUREMENTS\n"
curl -G http://localhost:8086/query --data-urlencode "db=dtest" --data-urlencode "q=SHOW MEASUREMENTS" --data-urlencode "pretty=true"

printf "\nSHOW SERIES\n"
curl -G http://localhost:8086/query --data-urlencode "db=dtest" --data-urlencode "q=SHOW SERIES" --data-urlencode "pretty=true"

printf "\nSELECT COUNT(DISTINCT(token)) FROM events\n"
curl -G http://localhost:8086/query --data-urlencode "db=dtest" --data-urlencode "q=SELECT COUNT(DISTINCT(token)) FROM events" --data-urlencode "pretty=true"

printf "\nSELECT DISTINCT(token) FROM events\n"
curl -G http://localhost:8086/query --data-urlencode "db=dtest" --data-urlencode "q=SELECT DISTINCT(token) FROM events" --data-urlencode "pretty=true"

The SELECT COUNT(DISTINCT(token)) returns an expected field argument in COUNT() error whereas the SELECT DISTINCT(token) returns function not found: \"DISTINCT\"

@buro1983
Copy link

buro1983 commented Mar 2, 2015

Hello,
I tried with 0.9.0-rc6 release and I found that below mentioned aggregate functions are not working with this release. I am posting here because it looks like same issue. Is there any update on this?

I am using command line to execute query statement.

/opt/influxdb/influx -host <remote_ip> -port 8086 -database mydb
InfluxDB shell 0.9.0-rc6
Connected to http://<remote_ip>:8086 version 0.9.0-rc6
> select Difference(my_col) from my_series
ERR: function not found: "Difference"

Same error I am getting for below aggregate functions.

ERR: function not found: "Top"
ERR: function not found: "Bottom"
ERR: function not found: "Difference"
ERR: function not found: "Derivative"
ERR: function not found: "Mode"
ERR: function not found: "Median
ERR: function not found: "Distinct"

Thanks in advance

@pauldix
Copy link
Member

pauldix commented Mar 3, 2015

We haven't wired up those queries yet. I've created issues to track them: #1819, #1820, #1821, #1822, #1823, #1824, #1825

@pauldix pauldix closed this as completed Mar 3, 2015
mark-rushakoff pushed a commit that referenced this issue Jan 11, 2019
feat(ui/dataLoaders) Create UI for creating telegraf config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants