我想在mysql中做一个考勤系统。比如说两个不同的日期。2017-12-21 和 2017-12-23
如果我有
我的表测试看起来像这样。姓名 日期 出席评论
Person 1 2017-12-21 Yes comment
Person 1 2017-12-23 Yes comment
Person 2 2017-12-21 No comment
Person 2 2017-12-23 Yes comment
我想要的结果是
-----2017-12-21----------------2017-12-23-----------
-----Person 1 Yes comment ---- Person 1 Yes comment
-----Person 2 NO comment ---- Person 2 Yes comment
----------------------------------------------------
认为 leftjoin 会起作用,但对我来说很难有人可以帮忙吗?谢谢。