use*_*747 4 azure azure-cosmosdb
我在 cosmos db 中编写了一个选择查询,效果很好。但在该查询中,当我尝试在别名列上按列添加顺序时,它不起作用。这里的距离是一个别名列,正确的方法是什么?
SELECT c.id,c.type,c.name,c.latitude,c.longitude,c.location, ST_Distance(c.location, { 'type': 'Point', 'coordinates':[-112.215641, 33.181647]}) as distance FROM c WHERE ST_Distance(c.location, { 'type': 'Point', 'coordinates':[-112.215641, 33.181647]}) < 321868.8 ORDER BY c.distance ASC
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1547 次 |
| 最近记录: |