[英]Pivot table like mysql structure
Need some help with a mySQL statement. 需要一些有关mySQL语句的帮助。 I currently have the following data which captures every change in delivery dates of different orders (with order number):
我目前拥有以下数据,这些数据捕获了不同订单(带有订单编号)的交货日期的每一次更改:
Order number Delivery date
VO15010228-1 2015-06-11
VO15010228-1 2015-05-10
VO15010969-1 2015-06-25
VO15010969-1 2015-05-25
I need to display this into a table like this: 我需要将其显示在这样的表中:
Order number Current del. date Previous del. date
VO15010228-1 2015-06-11 2015-05-10
VO15010969-1 2015-06-25 2015-05-25
I tried group_concat in my SQL statement, but I can't work with multiple dates into one single value. 我在SQL语句中尝试了group_concat,但无法将多个日期合并为一个值。 Any ideas?
有任何想法吗?
Kind regards, 亲切的问候,
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.