Azure / azure-cosmos-python

🚨🚨🚨This SDK is now maintained at https://github.com/Azure/azure-sdk-for-python 🚨🚨🚨
https://github.com/Azure/azure-sdk-for-python
MIT License
150 stars 141 forks source link

SQL queries with DISTINCT and ORDER BY does not work #190

Open rfinones-2019 opened 4 years ago

rfinones-2019 commented 4 years ago

Issuing QueryItems() with DISTINCT and ORDER BY together like below does not work and will yield duplicate results. SELECT DISTINCT c.FirstSeen, c.ConfigSha256 FROM c WHERE c.FirstSeen >= '2020-02-12T19:50:43' ORDER BY c.FirstSeen DESC

Removing the ORDER BY the result returned distinct records The portal's data explorer was not affected. Only if you are running via python SDK.