De: pgbr-geral [mailto:[email protected]] Em nome de 
Fábio Telles Rodriguez
Enviada em: quarta-feira, 2 de abril de 2014 13:30
Para: Comunidade PostgreSQL Brasileira
Assunto: [pgbr-geral] SQL Art



Roda aí....





select * from
(select array_to_string(array_agg(CASE WHEN 
(power((xx.x-25),2)/130+power((yy.y-25),2)/130)=1 THEN '$' WHEN 
(sqrt(power(xx.x-20,2)+power(yy.y-20,2)))<2 THEN '#' WHEN 
(sqrt(power(xx.x-20,2)+power(yy.y-30,2)))<2 THEN '#' WHEN 
(sqrt(power(xx.x-29,2)+power(yy.y-25,2)))<4 THEN '#' WHEN 
(power((xx.x-10),2)/40+power((yy.y-10),2)/40)=1 THEN '$' WHEN 
(power((xx.x-10),2)/40+power((yy.y-40),2)/40=1) THEN '$' ELSE ' ' END),' ') as 
cartoon from



(select generate_series(1,40) as x) as xx,(select generate_series(1,50) as y) 
as yy group by xx.x order by xx.x) as co_ord;

Tem a manha de fazer um melhor?



http://feedproxy.google.com/~r/blogspot/rFRqt/~3/oTGb8aK0Qt4/cartoon-in-pg.html




--

Atenciosamente,

Fábio Telles Rodriguez

blog: http:// <http://www.midstorm.org/~telles/> s 
<http://tellesr.wordpress.com/> avepoint.blog.br

e-mail / gtalk / MSN: [email protected]

Skype: fabio_telles



Timbira - A empresa brasileira de Postgres

http://www.timbira.com.br







Quase caí da cadeira. Fantástico!!!

Grande Abraço.





---
Este email está limpo de vírus e malwares porque a proteção do avast! Antivírus 
está ativa.
http://www.avast.com
_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

Responder a