Can I save sql queries as views in the query library and then call them

I want to save a view in retool query library as queryView1
And then query it in different apps e.g
select * from queryView1

Has anyone done this before?

Hi @Chilaka

Thanks for reaching out! I'm not sure if I'm fully understanding the use case yet, but this sounds like it should be doable with the query library! If it sounds like I'm misunderstanding your use case, please let me know and I'm happy to take another look.

If you already have a view in your SQL resource, you can query it in a Query Library query & then "Share" the query:

Then, you can import that query library query in any app to see the view results:

If you don't already have a view yet, you can create the view from within the query library (or within an app query):

Working with the query library should be the same as working with queries directly in apps. The difference is that you can Share & import Query Library queries across apps.