
is it possible to execute an sql script to one of my collections in the appwrite db ?

No, Appwrite is an abstraction on top of the underlying database and you access the data via the APIs provided

then how can i get the same result as the script i sent without using sql ?

There's a feature request for something like this so you should add a š to https://github.com/appwrite/appwrite/issues/5667.
Doing something like the query you shared is not advised because it will be slower and slower as the number of records in your table grows. If the records don't get updated, the best approach is to keep a running count in some metadata collection
Recommended threads
- Import Css glitsch?
Hey, Seems to be not only my computer, but some other i know - Seems that there's a css error When migrating, the input checkbox, and selectbox are.. out of st...
- I can't add relationship attributes on m...
How can I make it work in selfhosted Appwrite?
- Duplicate name types with multiple datab...
Hello, we are having multiple databases and would like to use the cli to generate the types using (appwrite types --language ts), the issue is that the appwrit...
