Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
First Query
CREATE TABLE table1(Date DATE, Val INTEGER); CREATE TABLE table2(Date DATE, Val INTEGER); CREATE TABLE table3(Date DATE, Val INTEGER); INSERT INTO table1 values('2013-01-01', 4); INSERT INTO table1 values('2013-01-02', 3); INSERT INTO table1 values('2013-01-04', 2); INSERT INTO table2 values('2013-01-01', 5); INSERT INTO table2 values('2013-01-03', 4); INSERT INTO table2 values('2013-01-04', 1); INSERT INTO table3 values('2013-01-02', 3); INSERT INTO table3 values('2013-01-03', 1); INSERT INTO table3 values('2013-01-06', 8); select Date,SUM(Val) from ( SELECT Date,Val FROM table1 Union SELECT Date, Val FROM table2 Union SELECT Date, Val FROM table3) as c group by c.Date
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
add loopback linked server
MixT
Empresa
Insert With Output Cluase
prog1
Performance test - select vs while - Get all days between two dates.
1D Hotel
Teset
table emp
split a string into pairs of words
Please log in to post a comment.