cartodb-postgresql/test/CDB_DistinctMeasureTest.sql

21 lines
410 B
MySQL
Raw Permalink Normal View History

2015-06-24 06:07:48 +08:00
-- a - j add up to 89%, k-m add up to 11%
WITH a As (
SELECT (
repeat('a',12) ||
repeat('b',11) ||
repeat('c',11) ||
repeat('d',10) ||
repeat('e',10) ||
repeat('f',9) ||
repeat('g',8) ||
repeat('h',7) ||
repeat('i',6) ||
repeat('j',5) ||
repeat('k',4) ||
repeat('l',4) ||
repeat('m',3)
)::text AS x
)
2015-06-24 06:32:16 +08:00
SELECT CDB_DistinctMeasure(string_to_array(x,null),0.90) from a