I have a MySQL table like this fiddle here: http://sqlfiddle.com/#!2/4ae5c/15
And the other has different from an API: http://sqlfiddle.com/#!2/b7946e/1
What I want to have is a result (weekly) like this:
+----------+----------+----------+------------+------------+------------+
| date | action | position | name | day | ID |
+----------+----------+----------+------------+------------+------------+
|17.06.2013| holiday | home | Winkler,Mr.| Monday | 0 |
|18.06.2013| holiday | home | Winkler,Mr.| Tuesday | 1 |
|19.06.2013| work | NYC | Winkler,Mr.| Wednesday | 2 |
|20.06.2013| work | NYC | Winkler,Mr.| Thursday | 3 |
|21.06.2013| work | NYC | Winkler,Mr.| Friday | 4 |
|22.06.2013| work | NYC | Winkler,Mr.| Saturday | 5 |
|23.06.2013| weekend | home | Winkler,Mr.| Sunday | 6 |
+----------+----------+----------+------------+------------+------------+
Does anyone of you have experience with anything like this?
I do not get do merge them correctly because of the missing dates in the second table.