sum of row when duplicate entries of date, difference between 2 ta

N

naveen prasad

dear all,
kindly help me in 2 problems
i have created 2 tables, d1, d2.

d1 fiels, id, date ,r1,r2 r1,r2 are numeric values only.

d2 fields id, x1,x2 x1,x2 are numeric values only.



problem 1.

from table d1, i want to get individual sum of fields r1 and r2.
condition is i have entered duplicated date entries many times

like example 20/09/09 20 40
20/09/09 10 50
20/09/09 15 100
19/09/09 25 20
19/09/09 10 10
18/09/09 45 45
17/09/09 10 10
17/09/09 15 15

now i want the result like below, kindly help me to make query for this.

20/09/09 45 190
19/09/09 35 30
18/09/09 45 45
17/09/09 25 25

the dates will be distinct and sum will be added for duplicated date entries.

need you kind help in this..



problem 2.

i want get the different of two table fields in new table

like x1-r1, x2-r2 in new table as y1, y2

in words , column r1 of d1 table - column x1 of d2 table.
 
N

naveen prasad

Excellent dear,
I have executed your summary and I got the answer which i required for the
first problem.



second problem little bit complex , need to find solution more.

Thanks alot dear for your kind help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top