Advertisement
Guest User

Untitled

a guest
Mar 25th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. select distinct cc.crtid, ccc.crtid
  2. from iris_certificates c
  3. left join iris_certificates cc on cc.inn = c.inn and cc.kpp = c.kpp and cc.typecert = 'Сертификат Сертум Классик/Голд'
  4. left join iris_certificates ccc on ccc.inn = c.inn and ccc.kpp = c.kpp and ccc.typecert = 'Квалифицированный сертификат'
  5. where ccc.finishdate = cc.finishdate and c.finishdate > '20190501'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement