I have a simple insights report of "Count Unique" ...
# questions
f
I have a simple insights report of "Count Unique" of "All Events" by day. I want to replicate the data with JQL, so I did:
Copy code
function main() {
	let recs = Events({
		from_date: '2023-01-01',
		to_date: '2100-01-01'
	});
	recs = recs.groupBy(
		[ mixpanel.numeric_bucket('time',mixpanel.daily_time_buckets), 'distinct_id' ]
		, mixpanel.reducer.null()
	);
	recs = recs.groupBy( ['key.0'], mixpanel.reducer.count() );
	recs = recs.map( function(rec) {
		return {
			day: new Date(rec.key[0]).toISOString().substr(0,10),
			count: rec.value
		};
	} );
	return recs;
}
The results don't match. Why not?