Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with wv(w) as (values(ARRAY['m54_2918_reg','m54_2918_oif'])),
- gobj(g) as (values(ARRAY[282,284]))
- select 1 clue, count(distinct concat(t.geo_object_id, r.article_id)) accepted_q
- from wv, gobj, ma_metro.reports r join ma_metro.tasks t on r.task_id=t.id
- where
- t.wave=any(w) and
- 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