Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2010
    Posts
    17

    Unanswered: Query help please

    Using the example of stock prices, suppose I have daily prices for a bunch of companys for the past year. Assuming I have name, date & price columns in my table, how would I get the change in price between any 2 dates for every company? So, for example, I would like to get the price change from yesterday to today (positive or negative) for each unique company. Thanks...

  2. #2
    Join Date
    Feb 2008
    Location
    Japan
    Posts
    3,483
    You have posted same question on Microsoft SQL Sever forum.
    http://www.dbforums.com/microsoft-sq...ce-change.html

  3. #3
    Join Date
    Mar 2010
    Posts
    17
    yeah, I accidently posted to the wrong forum. But the query should be the same (or close), if you are able to help me...

  4. #4
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    What DB2 version and OS are you using? What have you tried so far?

    Andy

  5. #5
    Join Date
    Mar 2010
    Posts
    17
    I'm actually using SQL Server, not DB2. I posted this in the wrong forum.
    I haven't tried anything yet, because I dont have a clue how to tackle it. I'm sure it's simple, but my SQL skills aren't so good yet. Can you help me out?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •