use commonswiki;
select
	date(left(log_timestamp, 8)) as date,
	count(*) as crosswikiupload
from (
	select
		logging.log_title, logging.log_user, logging.log_timestamp, logging.log_comment,
		ct_tag
	from logging
	inner join change_tag on ct_log_id=log_id and ct_tag='cross-wiki-upload'
	where logging.log_type='upload' and logging.log_action='upload'
	and logging.log_timestamp between '20150101' and '20160920'
) t
group by left(log_timestamp, 8);
