Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Arif First Query
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
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
View schema
Execution time: 0,03 sec, rows selected: 5, rows affected: 9, absolute service time: 0,17 sec
edit mode
|
history
|
discussion
Date
(No column name)
1
01.01.2013 00:00:00
9
2
02.01.2013 00:00:00
3
3
03.01.2013 00:00:00
5
4
04.01.2013 00:00:00
3
5
06.01.2013 00:00:00
8