Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

SQL question, Can I do something like Rest[] and Most[]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg110268] SQL question, Can I do something like Rest[] and Most[]
  • From: Jagra <jagra24891 at mypacks.net>
  • Date: Fri, 11 Jun 2010 02:08:48 -0400 (EDT)

I need some help not directly related to doing something in
Mathematica, but rather in SQL (another functional language) and
wondered if anyone here had some insight into it.

I have a simple data base table "timeseries" with three fields

id
values
datetime

The table has a few thousand rows of data

I need to calculate the ratio of each value to its previous value.

In Mathematica I'd sort values by datetime than do  something simple
like

Most[values] / Rest[values]

I wondered if anyone had any idea of how to do this efficiently in
SQL?

Also, if anyone has any recommendation for an SQL forum comparable to
what this forum provides for Mathematica.  Please advise.  (Even as I
ask the question I realize that I've never seen anything as helpful or
as sophisticated as this forum in any other subject area, but I can
always hope).

Thanks to all.


  • Prev by Date: Re: Push to clipboard?
  • Next by Date: Setting Attributes for Function Generated Parameters (with package
  • Previous by thread: Re: General question regarding solving equations
  • Next by thread: Re: SQL question, Can I do something like Rest[] and Most[]