I am creating a view to breakdown the number of node published per week using views. I were able to create a view that will show me the breakdown day or month but there is no option for week. How will I do that?
and the result
Also how do I make it show the first day of that week or the first item publish for that week.
Any help is appreciated.
** update**
I were able to get the right mysql query:
SELECT COUNT(DISTINCT node.nid) AS nid, MIN(node.nid) AS nid_1, 'node' AS field_data_field_published_at_node_entity_type, YEARWEEK(DATE_FORMAT((DATE_ADD('19700101', INTERVAL node.created SECOND) + INTERVAL -14400 SECOND), '%Y%m%d')) AS node_created_yearweek FROM node LEFT JOIN field_data_field_published_at field_data_field_published_at ON node.nid = field_data_field_published_at.entity_id AND field_data_field_published_at.entity_type = 'node' WHERE (( (node.status = '1') )) GROUP BY field_data_field_published_at_node_entity_type, node_created_yearweek ORDER BY node_created_yearweek DESC LIMIT 55;
How can I add the query to the view?
update 2
base on you answer it is grouping by day showing week:
and the list is still the same grouping by day showing week.
The numbers in parenthesis are the number of item published that/a day of the week.
Example on week 21 we published item 6 days in that week and in the parenthesis is the number of item published for each day.