我有表命名为具有列作为日,monyh,一年Subscription_stats,total_payments。而我必须获取记录datewise.The问题是我有日,月,年分开的列,所以我如何获取记录。我不仅通过过滤器获取数据,我还希望所有数据都是以日期显示的。MySql的提取记录日期从明智的日,月,单独列
样品输入:
Day Month Year Total_payments
10 01 2008 10
10 01 2008 20
11 02 2008 10
10 03 2010 10
输出:
Datewise:
date total_payments
-----------------------------
10-01-2008 30
11-02-2008 10
10-03-2010 10
提示:“GROUP BY”。 –
[在MySQL中创建日期,月份,年份字段]的可能副本(https://stackoverflow.com/questions/3960049/create-date-from-day-mon-year-fields-in-mysql) – Alexander
Don没有单独的列 – Strawberry