christine1
MIS
Can anyone help me formulate a query
I want to write a query that selects * from the test_table
between the dates 01/01/1995 thru 06/30/2000
(I need to 1-sum the following columns:
1-sum(col_1+col_2+col_3+col_4)
for each item last record in that year. ***we are going back five years, for each item that is being represented by an event record in this table***
divide that number ***for each units end of the year record*** col_5 , multiply it by 100.0
***And this should give me the stats for each item represented in the table***
All of this in one query. I know I need a subquery, aggregate funtion - sum, and an order by statement
but I am still having trouble visualizing it.
Please help.
I want to write a query that selects * from the test_table
between the dates 01/01/1995 thru 06/30/2000
(I need to 1-sum the following columns:
1-sum(col_1+col_2+col_3+col_4)
for each item last record in that year. ***we are going back five years, for each item that is being represented by an event record in this table***
divide that number ***for each units end of the year record*** col_5 , multiply it by 100.0
***And this should give me the stats for each item represented in the table***
All of this in one query. I know I need a subquery, aggregate funtion - sum, and an order by statement
but I am still having trouble visualizing it.
Please help.