4 CREATE VIEW user_view AS
20 p.creator_id = u.id) AS number_of_posts,
23 coalesce(sum(score), 0)
29 AND p.id = pl.post_id) AS post_score,
36 c.creator_id = u.id) AS number_of_comments,
39 coalesce(sum(score), 0)
45 AND c.id = cl.comment_id) AS comment_score