Postgresql – What is the difference between direct addition (1 + 1) vs aggregate function SUM(1 + 1)
See the query below where I get the reputation value from direct addition without a function. SELECT "User"."id", "User"."name", "User"."title", "User"."about", "User"."location", "User"."isModerator", "User"."createdAt", ( -- question vote COALESCE(SUM("PostVote"."value" * 10) FILTER (WHERE "value" = 1 AND "Post"."questionId" IS NULL),…