USE wmf;
SELECT
	day, hour,
	parse_url(referer, 'HOST') AS ref,
	uri_path, uri_query,
	geocoded_data['country'] AS country_name,
	user_agent,
	webrequest_source,
	COUNT(*) AS pageviews
	FROM webrequest
	WHERE year = 2015
	AND month = 03
	AND day BETWEEN 01 AND 06
	AND http_status IN(304,200)
	AND uri_host = 'www.wikipedia.org'
	AND content_type LIKE('text/html%')
	GROUP BY day, hour, parse_url(referer, 'HOST'), uri_path, uri_query, geocoded_data['country'], user_agent, webrequest_source;