MyTetra Share
Делитесь знаниями!
Платежи по Ольхонскому р-ну и Листвянке
Время создания: 06.07.2020 12:22
Раздел: INFO - JOB - rtneo - Выгрузки
Запись: wwwlir/Tetra/master/base/15940093573b1jefxetz/text.html на raw.githubusercontent.com

select EXTRACT(MONTH from p.date) as period, sum(p.sum) from rtneo$Payment p where p.inn in (select c.inn from rtneo$Contragent c where (lower(c.legalAddress) like '%%ольхонский%%' or lower(c.legalAddress) like '%%листвянка%%') and lower(c.legalAddress) not like '%%-листвянка%%') group by period


select EXTRACT(MONTH from p.date) as period, sum(p.sum) from rtneo$Payment p where p.inn in (select c.inn from rtneo$Contragent c where (lower(c.legalAddress) like '%%ольхонский%%' or lower(c.legalAddress) like '%%листвянка%%') and lower(c.legalAddress) not like '%%-листвянка%%' and not c.inn is null) and not p.inn is null group by period



Так же в этом разделе:
 
MyTetra Share v.0.55
Яндекс индекс цитирования