I'm new in databases so I need help. I have two tables:
First table:
| Date .........| Diagnostics ................| ID ...............|
| 2015-03-08 ...| Diag1 ......................| 2932 .............|
| 2015-03-09 ...| Diag2 ......................| 2932 .............|
Second table:
| Date ..........| Evaluation .................|ID ................|
| 2015-03-09 ....| Eval1 ......................| 2932 .............|
| 2015-03-09 ....| Eval2 ......................| 2932 .............|
| 2015-03-10 ....| Eval3 ......................| 2932 .............|
And this is what I want – 1 table, rows grouped by dates , 2 columns where id, in this case, is 2932 :
| Date ..........| Diagnostics ...............| Evaluation ...............|
| 2015-03-08 ....| Diag1 .....................| ..........................|
| 2015-03-09 ....| Diag2 .....................| Eval1, Eval2 .............|
| 2015-03-10 ....| ...........................| Eval3 ....................|
I have tried to do all kind of joins, unions etc. and just couldn't get right result.
Best Answer