Skip to content

Big changesets queries

Norbert Renner edited this page Jun 19, 2017 · 2 revisions

See

select

select id, 
       round(st_area(geom)::numeric,7) as deg², 
       closed_at - created_at as duration,
       num_changes
  from osm_changeset 

where clauses

  • area, >= 50000
     where num_changes >= 50000
     order by st_area(geom) desc
  • duration
     where open = false
     order by (closed_at - created_at) desc
  • area
     where num_changes > 0
       and geom is not null
     order by st_area(geom) desc
  • area, < '00:04:00', >= 10000
     where num_changes >= 10000
       and (closed_at - created_at) < '00:04:00'::interval
     order by st_area(geom) desc
  • small area, >= 50000
     where num_changes >= 50000
       and st_area(geom) < 1
     order by closed_at - created_at desc

big changesets

select id, 
       round(st_area(geom)::numeric,7) as deg², 
       closed_at - created_at as duration,
       num_changes,
       created_at
  from osm_changeset
 where id in (45229331,45018920,45031863,45656403,46858895,44989548,46988696,46552513,45488240,45489434,45064759,45639229,45579952)
 order by id