db icon indicating copy to clipboard operation
db copied to clipboard

Complicated Count SQL

Open juchaosong opened this issue 5 years ago • 1 comments

SELECT count(DISTINCT "archive"."uid" )
  FROM "argo_archived_workflows" AS "archive" JOIN "argo_archived_workflows_labels" AS "archive_labels" ON(archive.uid= archive_labels.uid)
 WHERE("archive" . "namespace"= "ns")

How to express complicated count sql using db.v3 ? I use Selector.Paginate(uint(limit)).TotalEntries(), but where's no way to custom count expression. Thanks for your answer.

juchaosong avatar May 05 '20 15:05 juchaosong

BTW, it's postgresql.

juchaosong avatar May 05 '20 15:05 juchaosong