Backend: Unique Duo feature usage metric

Overview

This issue is to add the PostgreSQL equivalent of the ClickHouse duoUsedCount metric i.e. total unique Duo users in a namespace. The metric should be based off of the events in the ai_events_counts table and be exposed via the AiMetricsBasic endpoint.

This metric will be added to the table which is being introduced in Frontend: PG Duo usage metrics table first iter... (#578196) • Unassigned • 18.7

Edited by Felipe Cardozo