SELECT COUNT(*)
FROM table
;
SELECT *
FROM table
WHERE (frozen_rand >= 123) AND (frozen_rand <= 456)
ORDER BY RAND() ASC
LIMIT 1000
;
It also has the "obfuscate" option that is useful for test reports. clickhouse-format --obfuscate frozen_rand BETWEEN % (rand_low) s
AND % (rand_high) s
Should all be on one line, those aren't two different conditions.Otherwise there is also SQLFluff: https://sqlfluff.com/