DROP TABLE IF EXISTS cars_hist_out; SELECT * FROM hist ( ON (SELECT 1) PARTITION BY 1 InputTable ('cars_hist') OutputTable ('cars_hist_out') StartValue ('20') BinSize ('50') EndValue ('400') Inclusion ('right') ValueColumn ('hp') GroupbyColumns ('cyl') );