MySQL求每一個用戶當月是否消費過

SELECT userId,DATE_FORMAT(paidTime,"%Y%m-01") from learn.order_info_utf GROUP BY userId,DATE_FORMAT(paidTime,"%Y%m-01") 使用left join SELECT t1.m,count(t1.m),count(t2.m) FROM ( SELECT userId,DATE_FORMA
相關文章
相關標籤/搜索