
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
- Database error
My code: await databases.createDocument( process.env.APPWRITE_DATABASE, process.env.APPWRITE_COLLECTION_USER, data.userId, ...
- API preflight request not working on .f...
When I am calling a function on my APP through the domain is failing. Because the preflight request (OPTIONS HTTP request) times out. this only occurs with fu...
- No Headers
Hi I have 2 appwrite functions, one is working fine on localhost, second is not even working on prod with https, i inspected the api call, no headers are being ...
