# How to fetch data from superbase view

**URL:** <https://community.weweb.io/t/how-to-fetch-data-from-superbase-view/6558>\
**Category:** How do I?\
**Tags:** supabase\
**Created:** [January 23, 2024, 4:12am UTC](https://community.weweb.io/t/how-to-fetch-data-from-superbase-view/6558 "2024-01-23T04:12:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sonrisa](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@sonrisa](https://community.weweb.io/u/sonrisa)\
**Post date:** [January 23, 2024, 4:12am UTC](https://community.weweb.io/t/how-to-fetch-data-from-superbase-view/6558/1 "2024-01-23T04:12:50Z")

</div>

Hi!  
How do I fetch data from a superbase view instead of a table and apply pagination for it?  
Should I do it via REST api or Superbase connection

Context:  
I have two table: tasks and reviews. Each task can have many reviews.  
I want to aggregate an average review rating for each task, so I created a view task\_with\_rating in superbase. How do I display that collection in weweb so with a dashboard of tasks, each of the has a rating with it?  
Thanks!

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [January 23, 2024, 8:08am UTC](https://community.weweb.io/t/how-to-fetch-data-from-superbase-view/6558/2 "2024-01-23T08:08:36Z")

</div>

Just use the Supabase collection and fetch the view 🙂 Then bind it as normal.

---

<div class="post-metadata">

**Author:** ![sonrisa](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@sonrisa](https://community.weweb.io/u/sonrisa)\
**Post date:** [January 23, 2024, 4:56pm UTC](https://community.weweb.io/t/how-to-fetch-data-from-superbase-view/6558/3 "2024-01-23T16:56:32Z")

</div>

> [@Broberto](#):
>
> collection

But the superbase collection only has the table dropdown, I don’t see my view in there?

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/2/215dad7925fca6542ef722cc0158cd5d49ff9d39.png)

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [January 23, 2024, 5:11pm UTC](https://community.weweb.io/t/how-to-fetch-data-from-superbase-view/6558/4 "2024-01-23T17:11:59Z")

</div>

It’s in the table dropdown, just look for it. Obviously you also need the view to be created.

---

<div class="post-metadata">

**Author:** ![sonrisa](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@sonrisa](https://community.weweb.io/u/sonrisa)\
**Post date:** [January 23, 2024, 5:23pm UTC](https://community.weweb.io/t/how-to-fetch-data-from-superbase-view/6558/5 "2024-01-23T17:23:35Z")

</div>

Got it. It’s showing up now!.. I guess it needed some time to sync with supabase. Thanks!
