Advertisement
Guest User

Untitled

a guest
Jul 17th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. with wv(w) as (values(ARRAY['m54_2918_reg','m54_2918_oif'])),
  2. gobj(g) as (values(ARRAY[282,284]))
  3. select 1 clue, count(distinct concat(t.geo_object_id, r.article_id)) accepted_q
  4. from wv, gobj, ma_metro.reports r join ma_metro.tasks t on r.task_id=t.id
  5. where
  6. t.wave=any(w) and
  7. t.geo_object_id=any(g) and project_id=2 and r.state ='accepted' group by r.state
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement