SELECT WIDTH_BUCKET( public.ST_X ( geom ),107.63636363636364,114.90916363636364,10 ) grid_x,WIDTH_BUCKET( public.ST_
SELECT WIDTH_BUCKET( public.ST_X ( geom ),107.63636363636364,114.90916363636364,10 )
grid_x,WIDTH_BUCKET( public.ST_Y ( geom ),25.454545454545457,29.090981818181824,5 )
grid_y,COUNT ( * ) count,public.ST_X(public.ST_CENTROID ( public.ST_COLLECT ( geom ) )) center_x,
public.ST_Y(public.ST_CENTROID ( public.ST_COLLECT ( geom ) )) center_y,
case when COUNT (*)<6 then ARRAY_AGG ( pk_uid ) end pk_uid
FROM hngsmmzt.hngs_gsmm_pt
WHERE 1=1 and geom is not null AND
public.ST_X( geom ) BETWEEN 107.63636363636364 AND 114.90916363636364
AND public.ST_Y( geom ) BETWEEN 25.454545454545457 AND 29.090981818181824
AND shzt="2" GROUP BY grid_x,grid_y
--结束END--
本文标题: Postgrsql 使用CASE WHEN解决不定列问题
本文链接: https://lsjlt.com/news/4531.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-10-23
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0