1楼的这个代码可以,我测试过了,顶一下:
(select '2015-10-1-table' as k,`money`,`code` from `2015-10-1-table` order by `money` desc limit 1)
union all
(select '2015-10-2-table' as k,`money`,`code` from `2015-10-2-table` order by `money` desc limit 1)
union all
(select '2015-10-3-table' as k,`money`,`code` from `2015-10-3-table` order by `money` desc limit 1)
union all
...
union all
(select '2015-10-31-table' as k,`money`,`code` from `2015-10-31-table` order by `money` desc limit 1)
(select '2015-10-1-table' as k,`money`,`code` from `2015-10-1-table` order by `money` desc limit 1)
union all
(select '2015-10-2-table' as k,`money`,`code` from `2015-10-2-table` order by `money` desc limit 1)
union all
(select '2015-10-3-table' as k,`money`,`code` from `2015-10-3-table` order by `money` desc limit 1)
union all
...
union all
(select '2015-10-31-table' as k,`money`,`code` from `2015-10-31-table` order by `money` desc limit 1)