fix(parser): sql request fix

This commit is contained in:
ivannoskov
2026-01-07 16:34:31 +03:00
parent e4199fc9c9
commit 89f4d6bf69

View File

@@ -19,7 +19,8 @@ func (d *Database) GetChannelsWithTrackedPosts(ctx context.Context) ([]domain.Ch
c.access_hash, c.access_hash,
c.pts c.pts
FROM channel c FROM channel c
INNER JOIN placement p ON p.placement_channel_id = c.id INNER JOIN purchase_channel pc ON pc.channel_id = c.id
INNER JOIN placement p ON p.purchase_channel_id = pc.id
INNER JOIN post po ON po.id = p.post_id INNER JOIN post po ON po.id = p.post_id
WHERE po.deleted_from_channel_at IS NULL;` WHERE po.deleted_from_channel_at IS NULL;`