File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic

Help in Query

 
Geeta Ravikanti
Ranch Hand
Posts: 46
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
I have the table like following

Time/Date Close Average

1 100 NO
2 200 No
3 129.39 No
4 200 No
5 129.39 No
6 100 NO
7 200 No
8 129.39 No
9 100 NO
10 200 No
11 123 avg(close(1 to 10)/10)
12 234 avg(close(2 to 11)/10)has to display
13 231 avg(close(3 to 12)/10)has to display
14 . ...
15 . ...and so on
16
17
18
19
29

where ever i want to find the avg ,I have to take the 10 closes values beofore the curent value
how can i write that query in Sql
I dont know the logic in writing the query in Sql

please help me
 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
your original thread http://www.coderanch.com/t/306702/JDBC/java/Help-Query is still alive.

please don't post the same question multiple times, as it wastes people's time when multiple redundant conversations take place.
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic