SQL query to get both daily and weekly stats

vlom31

Member
Hi all,

I am currently using this sql query to get daily posts stats to my Cyfe dashboard :
Code:
SELECT DATE(FROM_UNIXTIME(post_date)) AS Jour,
        COUNT(*) AS Posts
 FROM   xf_post
 GROUP BY DATE(FROM_UNIXTIME(post_date))
 ORDER BY Jour
Now on top of the daily area chart, i'd like to add lines for the weekly posts stats .. how can I modify that query to do that ?


Mehdi

PS : Jour means Day.
 
Top