Imagine I have a collection of stock data, where there is a "symbol" attribute for each document. In my python function I want to query my collection to return a list of "symbol" attribute values that are unique.
i.e. If I had 3 documents and 2 of the documents had their symbol attribute as "AAPL", and the third document had their symbol attribute as "MSFT", the query would return a list of ["AAPL", "MSFT"]
# Query Database for list of unique symbols
client = (
Client()
.set_endpoint('https://cloud.appwrite.io/v1')
.set_project(PROJECT_ID)
.set_key(APPWRITE_API_KEY)
)
databases = Databases(client)
docs = databases.list_documents(
DATABASE_ID,
COLLECTION_ID,
queries=[
# What queries do I add here?
Query.select(['symbol'])
]
)
Recommended threads
- After assigning a domain to my Dart func...
I’ve attached the images. Could anyone please explain how this execution is being performed?
- I can't UNPAUSE my project with the free...
I received an email notifying me that my project had been paused due to inactivity, and the email included a link to "Restore project." However, that button red...
- How to bypass the rate limit on the back...
Once a month my app has a ton of usage and I always run into the Too many requests 429 error. I am trying to optimize the queues and jobs to manage that, but a...