This SQL query (requires PostgreSQL 8.4) produces an ASCII-art image of the Mandelbrot set. It is written entirely in SQL:2008-conformant SQL.