Answer to Question #61144 in Databases | SQL | Oracle | MS Access for Kate

Question #61144
I have a table:
_date(2014-03-05;2014-04-05)
_period(1,2,3,4,5,1,2,3,4,5,1,2; 1,2,3,4,5)
_id(x1,x1,x1,x1,x1,x2,x2,x2,x2,x2,x3,x3;x4,x4,x4,x4,x4)
_reading(1,1,1,1,1,2,2,2,2,2,5,6;1,1,1,1,1)
_reading2 (5,5,5,5,5,4,4,4,4,4,7,7;1,1,1,1,1)

i need a result like below which eliminates all data which doesn't have full period 1 to 5 for the _id, then calculates the sum of _reading for a day and sum of _reading2 for each distinct _id for a day:

_date(2014-03-05;2014-04-05)
sum_reading(5,10; 5)
sum_reading(15; 5)
1
Expert's answer
2016-08-08T09:19:02-0400
DELETE FROM "name_of_table" WHERE _id = 'x3';
SELECT _date, SUM(_reading) SELECT _date, SUM(_reading2)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

Assignment Expert
02.08.16, 18:57

Dear Kate, please use panel to submit questions.

Assignment Expert
02.08.16, 16:30

Corrected.

Kate
02.08.16, 16:00

Correction: sum_reading(15; 5)

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS