You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* sql case1 tile */
SELECT
'cluster' AS type,
'case1 tile' AS log,
NULL AS zoom_to,
region_id id,
st_point(LEAST(st_x(centroid), 170), st_y(centroid)) estimated_geometric_location,St_asgeojson(st_point(LEAST(st_x(centroid), 170), st_y(centroid))) latlon,
type_id as region_type,
count(tree_region.id) count,
CASE WHEN count(tree_region.id) > 1000
THEN (count(tree_region.id) / 1000) || 'K'
ELSE count(tree_region.id) || ''
END AS count_text
FROM active_tree_region tree_region
JOIN trees ON tree_region.tree_id = trees.id
INNER JOIN wallet.token ON wallet.token.capture_id::text = trees.uuid
INNER JOIN wallet.wallet ON wallet.wallet.id = wallet.token.wallet_id
WHERE zoom_level = 2
AND wallet.wallet.name = 'heveya.replant.world'
GROUP BY region_id, centroid, type_id
The two 1k here should be 1k and 2k.
Result:
The text was updated successfully, but these errors were encountered: