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

add all documentation queries to automated testing #3327

Closed
beckettsean opened this issue Jul 14, 2015 · 0 comments
Closed

add all documentation queries to automated testing #3327

beckettsean opened this issue Jul 14, 2015 · 0 comments

Comments

@beckettsean
Copy link
Contributor

Let's try to avoid another #3326

Here's a reasonable approximation of the SELECT statements in our docs. It's the heavily edited result of :~/workspace/influxdb.com/content/docs/v0.9$ grep -RiA 4 '^select' *, so we're missing SELECT queries that don't start a line.

SELECT mean(value) FROM cpu WHERE region="uswest" AND az="1" AND server="server01" GROUP BY time(30s)

SELECT mean(value) FROM /cpu.*/ WHERE time > now() - 1h GROUP BY time(30m)

SELECT value FROM "mydb"."mypolicy".cpu_load

SELECT value FROM mydb.mypolicy.cpu_load

SELECT mean(value) FROM cpu WHERE time > 12345678s GROUP BY time(10m); SELECT value from "hour_summaries".cpu WHERE time > now() - 7d

SELECT value FROM response_times WHERE time > '2013-08-12 23:32:01.232' and time < '2013-08-13';

SELECT value FROM response_times WHERE time > now() - 1h limit 1000;

SELECT value FROM response_times WHERE time > 1388534400s

SELECT value / 2 from cpu_user

SELECT (value * 2) + 4 from cpu_user

SELECT (value + 6) / 10 from cpu_user

SELECT * FROM events, errors;

SELECT * FROM /^stats\./i WHERE time > now() - 1h;

SELECT * FROM /.*/ limit 1;

SELECT * FROM "otherDB"../disk.*/ LIMIT 5

SELECT * FROM "otherDB"../disk.*/ SLIMIT 5

SELECT * FROM "1h"./disk.*/ LIMIT 1

SELECT * FROM log_lines WHERE line =~ /error/i

SELECT * FROM response_times WHERE value > 500 AND region='us-west'

SELECT * FROM events WHERE email !~ /.*gmail.*/

SELECT * FROM events WHERE (email =~ /.*gmail.*/ OR email =~ /.*yahoo.*/) AND state = 'ny'

SELECT COUNT(type) FROM events WHERE time > now() - 3h GROUP BY time(1h) fill(0)

SELECT COUNT(type) FROM events WHERE time > 12345678s GROUP BY time(1h) fill(-1)

SELECT COUNT(type) FROM events WHERE time > now() - 3h GROUP BY time(1h) fill(null)

SELECT COUNT(type) FROM events WHERE time > now() - 3h GROUP BY time(1h) fill(previous)

SELECT COUNT(type) FROM events WHERE time > now() - 3h GROUP BY time(1h) fill(none)

SELECT count(type) FROM events WHERE time > 12345678s GROUP BY time(1h), type fill(0)

SELECT mean(value) FROM cpu WHERE region = 'uswest' AND time > 12345678s GROUP BY time(5m), * LIMIT 10

SELECT mean(value) FROM cpu WHERE app =~ '.*someapp.*' AND time > now() - 4h GROUP BY time(4m), * LIMIT 10

SELECT count(type) FROM events WHERE time > now() - 1h GROUP BY time(10m), type

SELECT count(type) FROM events WHERE time > now() - 1d GROUP BY host

SELECT COUNT(field_key) FROM measurement

SELECT MIN(field_key) FROM measurement

SELECT MAX(field_key) FROM measurement 

SELECT MEAN(field_key) FROM measurement

SELECT MEDIAN(field_key) FROM measurement

SELECT DISTINCT(field_key) FROM measurement 

SELECT COUNT(DISTINCT(field_key)) from measurement

SELECT PERCENTILE(field_key, N) FROM measurement

SELECT DERIVATIVE(field_key) FROM measurement

SELECT DERIVATIVE(field_key, 1h) FROM measurement

SELECT DERIVATIVE(MEAN(field_key), 1s) FROM measurement

SELECT SUM(field_key) FROM measurement

SELECT STDDEV(field_key) FROM measurement

SELECT FIRST(field_key) FROM measurement

SELECT LAST(field_key) FROM measurement

SELECT * FROM "series with special characters!"

SELECT * FROM "series with \"double quotes\""

SELECT * FROM "α-measurement"

SELECT * FROM mydb WHERE time > now() - 1d

SELECT * FROM mydb WHERE time> now() - 1d

SELECT * FROM mydb WHERE time >now() - 1d

SELECT * FROM mydb WHERE time > now()- 1d

SELECT count(type) AS number_of_types FROM measurement WHERE time > now() - 1d
@beckettsean beckettsean added this to the 0.9.4 milestone Jul 14, 2015
@beckettsean beckettsean modified the milestones: Future Point Release, 0.9.4 Aug 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant