Aggregate data on Supabase

Hello guys,
I’m trying to aggregate data from joined tables to show in a chart in my app dashboard.
I was successful doing it using a VIEW on Supabase, however now I would like to filter the data before aggregating it by day. How can I do it?

I’m tracking visits and clicks in a website.
I need to filter visits and clicks using 5 UTM parameters: utm_source, utm_medium, utm_campaign, utm_content, and utm_term. After filtering I would aggregate it all by day.
Any ideas? Cheers

Hello. A where clause should be enough right?

Sorry, how do I filter using the where clause and then aggregate in the backend, returning only the aggregated data to the front end?

I think you might want to check this out, it shows how to filter the Supabase data in the Workflow Actions, then you should be able to use the Count Option to count the results. You basically need to go to Workflow → Database | Select and do the filtering as described in the article. Then you should be able to use the Count Switch to count the results.

1 Like

I’ll try that. Thank you, Bro

1 Like