This commit is contained in:
parent
8b377123e1
commit
87aa39959a
|
@ -82,9 +82,7 @@ def query_shouts():
|
||||||
Shout,
|
Shout,
|
||||||
ShoutReactionsFollower,
|
ShoutReactionsFollower,
|
||||||
func.count(case((aliased_reaction.body.is_not(None), 1))).label("comments_stat"),
|
func.count(case((aliased_reaction.body.is_not(None), 1))).label("comments_stat"),
|
||||||
func.count(ShoutReactionsFollower.follower)
|
func.count(distinct(aliased_reaction.created_by)).label("followers_stat"),
|
||||||
.filter(ShoutReactionsFollower.shout == Shout.id)
|
|
||||||
.label("followers_stat"),
|
|
||||||
func.sum(
|
func.sum(
|
||||||
case(
|
case(
|
||||||
(aliased_reaction.kind == ReactionKind.LIKE.value, 1),
|
(aliased_reaction.kind == ReactionKind.LIKE.value, 1),
|
||||||
|
@ -104,8 +102,6 @@ def query_shouts():
|
||||||
Shout.id,
|
Shout.id,
|
||||||
authors_subquery.c.authors,
|
authors_subquery.c.authors,
|
||||||
topics_subquery.c.topics,
|
topics_subquery.c.topics,
|
||||||
ShoutReactionsFollower.follower,
|
|
||||||
ShoutReactionsFollower.shout,
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user