Function count_instances_by_app

Source
pub async fn count_instances_by_app(
    pool: &Pool<MySql>,
    app_id: i64,
) -> Result<i64>
Expand description

Counts the number of instances for each application (grouped by app_id).

This function returns a vector of tuples, where each tuple contains an app_id and the corresponding count of instances for that app. Useful for dashboards or analytics where you want to see instance distribution per app.