I love PostgreSQL, but... What if I need to "downscale" to SQLite? It doesn't even has the SIGN() to implement delta functions (at least not directly ;).<div>Of course, pivot tables are easily achievable via subselects/joins/temporary tables, but it's not quite an efficient way. I mean, it might hurt my brain to have to implement something 10x more intelligible if it is 100x slower :)<div>

<br>ABS()<br><br>
<br><br><div class="gmail_quote">On Sun, Aug 14, 2011 at 19:24, Randal L. Schwartz <span dir="ltr"><<a href="mailto:merlyn@stonehenge.com">merlyn@stonehenge.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">>>>>> "Stanislaw" == Stanislaw Pusep <<a href="mailto:creaktive@gmail.com">creaktive@gmail.com</a>> writes:<br>
<br>
</div>Stanislaw> Esse seria o output, agregado por soma.<br>
Stanislaw> Como vocĂȘ imagina a query para fazer isso, em SQL puro?<br>
<br>
In PostgreSQL it'd be something with generate_sequence().<br>
<font color="#888888"><br>
--<br>
</font><div><div></div><div class="h5">Randal L. Schwartz - Stonehenge Consulting Services, Inc. - <a href="tel:%2B1%20503%20777%200095" value="+15037770095">+1 503 777 0095</a><br>
<<a href="mailto:merlyn@stonehenge.com">merlyn@stonehenge.com</a>> <URL:<a href="http://www.stonehenge.com/merlyn/" target="_blank">http://www.stonehenge.com/merlyn/</a>><br>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.<br>
See <a href="http://methodsandmessages.posterous.com/" target="_blank">http://methodsandmessages.posterous.com/</a> for Smalltalk discussion<br>
</div></div></blockquote></div><br></div></div>