select "tiktoks".*, (select avg(tv.ids_count) from (select count(id) as ids_count from "tiktok_videos" where "tiktok_id" = "tiktoks"."id" group by date_trunc('day', created_at)) as "tv") as "avg_videos_per_month" from "tiktoks" where "tiktoks"."deleted_at" is null