Closed otilor closed 1 year ago
Closing stale issue
Did you manage to get it? I'm trying to do something similar with no results :/
Can't really remember. I think I did tho'. No longer have access to the codebase.
This works apparently, if you look at the aggregate() method used by the count(), sum(), etc. It uses the column name and the aggregate in a string, so you can pass different values depending on what you need
Trend::query(Attendee::query())
->between(
start: now()->setDate(2021, 1, 1),
end: now(),
)
->perMonth()
->count('DISTINCT user_id');
Ok. Thank you.
@vpuentem , thank you, this worked for me.
Problem description
When trying to retrieve unique attendees of an event. I'm using this query:
It works on its own but when using it in this chart widget;
I get this error: