也许这不是最好的方法,但是它将解决您的问题。快速介绍:
SELECt 'January' AS mName, 1 AS mOrder, COALESCE(SUM(amount),0) AS total_num FROM income iWHERe month(i.date) = 1UNIOnSELECt 'February' AS mName, 2 AS mOrder, COALESCE(SUM(amount),0) AS total_num FROM income iWHERe month(i.date) = 2UNIOn...and go on
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)