2020-08-05 22:43:23 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
2020-12-28 11:46:53 +00:00
|
|
|
# shellcheck source=../shell_config.sh
|
2020-08-05 22:43:23 +00:00
|
|
|
. "$CURDIR"/../shell_config.sh
|
|
|
|
|
|
|
|
echo 'one block'
|
|
|
|
${CLICKHOUSE_LOCAL} --query="SELECT * FROM numbers(2)" --format PrettyCompactMonoBlock
|
|
|
|
echo 'two blocks'
|
|
|
|
${CLICKHOUSE_LOCAL} --query="SELECT * FROM numbers(1) UNION ALL SELECT * FROM numbers(1)" --format PrettyCompactMonoBlock
|
|
|
|
echo 'extremes'
|
|
|
|
${CLICKHOUSE_LOCAL} --query="SELECT * FROM numbers(3)" --format PrettyCompactMonoBlock --extremes=1
|
|
|
|
echo 'totals'
|
2022-09-29 19:26:52 +00:00
|
|
|
${CLICKHOUSE_LOCAL} --query="SELECT sum(number) FROM numbers(3) GROUP BY number%2 WITH TOTALS ORDER BY number%2" --format PrettyCompactMonoBlock
|