Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Arif 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
Orders
Manish_SQL_11_dec
Sum then delete one row - SQL Server 2008 R2
EXP 8
Customer_Orders
SQL_leetcode
check constraint
Microsoft SQL Server T-SQL in 10mn ~ Lesson 15. Creating Advanced Joins samples...
EXP 8 q2
calendar