This example loads a CartoDB layer using a crazy SQL from a small variation of this awesome Stack Overflow response. Note the use of CSS style tags for the CartoCSS to allow easy editing.
The uncompressed (and not perfect!) version of the SQL to draw the Voronoi diagram is:
WITH
Sample AS (
SELECT st_setsrid(st_union(the_geom),0) as geom
FROM registro_centros_nz WHERE spanish = 1
),