CRM-12623, detail, stats, count distinct