
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
- Query params are way too limiting in ter...
I was trying to list rows in a table that do not already exist in another table. I retrieved around 260 row IDs which are 13 characters in length each, and then...
- Relationship null, even when relationshi...
Hi Everyone, im experiencing issues with set relation data. When im setting the document id from the related database most of them seem fine, except one table. ...
- REQUEST FAILED IN MIGRATION
I was trying to moved my archived project to a self-host database . Though the Project is "read only" but there's a message that I can view and migrate data to...
