我有一个表tbl_usi在mysql中有如下记载:mysql的显示一行多行
present_date usi_value deal_count ---------------------------------------------------------- 2015-10-13 b1 c1 2015-10-12 b2 c2 2015-10-11 b3 c3
我想写一个查询,将做到这一点使用present_date字段选择当前日期和日期然后将它们一起显示出来:
present_date usi_value deal_count previous_date previous_usi_value previous_deal_count ---------------------------------------------------------- 2015-10-13 b1 c1 2015-10-12 b2 c2 2015-10-12 b2 c2 2015-10-11 b3 c3 2015-10-11 b3 c3 2015-10-10 b4 c4
我该如何做到这一点。谢谢
相似的问题:https://stackoverflow.com/questions/11509407/add-multiple-rows-in-just-one-row-from-a-single-table – user5226582