<commit_before>SELECT 
	DATE(created_at - interval {TIME_SHIFT} hour)*1 created_date_id,
	COUNT(1) count_total,
	IFNULL(COUNT(IF(entry_media_type_id = 1, 1,0)),0) count_video ,
	IFNULL(COUNT(IF(entry_media_type_id = 2, 1,0)),0) count_image ,
	IFNULL(COUNT(IF(entry_media_type_id = 5, 1,0)),0) count_audio ,
	IFNULL(COUNT(IF(entry_media_type_id = 6, 1,0)),0) count_mix
FROM dwh_dim_entries ev
WHERE
{OBJ_ID_CLAUSE}
AND entry_media_type_id IN (1,2,5,6)
AND partner_id = {PARTNER_ID}
		AND created_at BETWEEN '{FROM_TIME}' - interval {TIME_SHIFT} hour /*FROM_TIME*/ 
		AND '{TO_TIME}' - interval {TIME_SHIFT} hour /*TO_TIME*/
GROUP BY DATE(created_at - interval {TIME_SHIFT} hour) *1<commit_msg>def: 4166 - change count(0) to count(null) <commit_after>SELECT 
	DATE(created_at - interval {TIME_SHIFT} hour)*1 created_date_id,
	COUNT(1) count_total,
	IFNULL(COUNT(IF(entry_media_type_id = 1, 1,NULL)),0) count_video ,
	IFNULL(COUNT(IF(entry_media_type_id = 2, 1,NULL)),0) count_image ,
	IFNULL(COUNT(IF(entry_media_type_id = 5, 1,NULL)),0) count_audio ,
	IFNULL(COUNT(IF(entry_media_type_id = 6, 1,NULL)),0) count_mix
FROM dwh_dim_entries ev
WHERE
{OBJ_ID_CLAUSE}
AND entry_media_type_id IN (1,2,5,6)
AND partner_id = {PARTNER_ID}
		AND created_at BETWEEN '{FROM_TIME}' - interval {TIME_SHIFT} hour /*FROM_TIME*/ 
		AND '{TO_TIME}' - interval {TIME_SHIFT} hour /*TO_TIME*/
GROUP BY DATE(created_at - interval {TIME_SHIFT} hour) *1
{'fraction_non_alphanumeric': 0.13604488078541374, 'fraction_numerical': 0.03295932678821879, 'mean_word_length': 6.713513513513513, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1696374', 'n_tokens_mistral': 602, 'n_tokens_neox': 566, 'n_words': 119}