fix(grfn/bbbg): Left join to attendees
Change-Id: Ic158a2c77e92410f078b67907b2a9537e2cb1392
This commit is contained in:
parent
c3cb7b0df8
commit
8bc2e83246
1 changed files with 2 additions and 2 deletions
|
@ -3,7 +3,7 @@
|
|||
[bbbg.attendee :as attendee]
|
||||
[bbbg.db :as db]
|
||||
[bbbg.event :as event]
|
||||
[honeysql.helpers :refer [merge-group-by merge-join merge-select]]
|
||||
[honeysql.helpers :refer [merge-group-by merge-left-join merge-select]]
|
||||
[java-time :refer [local-date]]))
|
||||
|
||||
(defn create! [db event]
|
||||
|
@ -34,7 +34,7 @@
|
|||
(defn with-attendee-counts
|
||||
[query]
|
||||
(-> query
|
||||
(merge-join :event_attendee [:= :event.id :event_attendee.event-id])
|
||||
(merge-left-join :event_attendee [:= :event.id :event_attendee.event-id])
|
||||
(merge-select :%count.event_attendee.attendee_id)
|
||||
(merge-group-by :event.id :event_attendee.event-id)))
|
||||
|
||||
|
|
Loading…
Reference in a new issue