Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 Other Topics
 query

Author  Topic 

sravani solasa
Starting Member

6 Posts

Posted - 2011-06-24 : 15:38:23
Under the assumption that the income (inc) and expenses (out) of the money at each outlet are written not more than once a day, get a result set with the fields: point, date, income, expense.
Use Income_o and Outcome_o tables.


russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2011-06-24 : 15:43:01
Homework question? What have you tried so far?
Go to Top of Page

sravani solasa
Starting Member

6 Posts

Posted - 2011-06-24 : 22:22:29
yes.......I tried the query and I got answer for that query..........thanks.

select point,date, sum(inc) as income, sum(out) as outcome from (select point, date, inc, out = null
from Income_o
union
select point, date, inc=null, out
from outcome_o) dt group by point, date
Go to Top of Page
   

- Advertisement -