Вверх ↑
Ответов: 16884
Рейтинг: 1239
#1: 2011-10-19 09:45:43 ЛС | профиль | цитата
nesco писал(а):
А куда твоя ссылка в посте пропала
проверил - ведет в никуда.
Посчитал Label. Всего 111 штук. А я думал 300
Вот нашел у себя. Этот запрос находится в FormatStr
select v7_2 as _Type, _Last as 'Неоконченные на начало[1]', This as 'Поступило в этом[2]', Udovl+Otkaz as 'Всего[3]', Udovl as 'С удовлетворением[4]', Gr4 as 'Приказы[5]', Otkaz as 'Отказ в удовл.[6]', Prekrasheno as 'Прекращено[7]', BezRas as 'Без рассмотрения[8]', Peredano as 'По подсудности[9]', gr10 as 'Свыше сроков[11]',OstatokNeokon as 'Остаток неокон.[12]', Priostanov as 'Приостановлено[13]', SummaChastOpred as 'Частные определения[14]',GosPoshlina as 'Г/П при подаче[15]',SummaUdovl as 'Присуждено[16]', SummaPoshlina as 'Г/П вдоход гос.[17]'
from usktable
join (select Type0, This
from (select v7_2 as Type0, null as This from usktable group by Type0 union all
select Type0, count(This1) as 'This' from (select v7_2 as 'Type0', v7_2 as 'This1'
from usktable where v1_1 between %1 and %2) group by Type0) group by Type0) on (Type0 = _Type)
join(select Type1, _Last
from (select v7_2 as 'Type1', null as '_Last' from usktable group by Type1 union all
select v7_2 as 'Type1', count(v7_2) as '_Last'
from usktable where (v1_1 between %3 and %4) and ((v11_1 = 0) or (v11_1 between %1 and %2)) group by Type1) group by Type1) on (Type1 = _Type)
join (select Type2, Itogo
from (select v7_2 as 'Type2', null as 'Itogo' from usktable group by Type2 union all
select v7_2 as 'Type2', count(v7_2) as 'Itogo'
from usktable where (v11_1 <>0) and (v11_1 between %1 and %2) group by Type2) group by Type2) on (Type2 = _Type)
join (select Type3, Udovl
from (select v7_2 as 'Type3', 0 as 'Udovl' from usktable group by Type3 union all
select v7_2 as 'Type3', count(v7_2) as 'Udovl'
from usktable where (v13_1 = 1) and (v11_1 between %1 and %2) group by Type3) group by Type3) on (Type3 = _Type)
join (select Type4, Gr4
from (select v7_2 as 'Type4', null as 'Gr4' from usktable group by Type4 union all
select v7_2 as 'Type4', count(v7_2) as 'Gr4'
from usktable where (v12_1 = 2) and (v11_1 between %1 and %2) group by Type4)) on (Type4=_Type)
join (select Type5, Otkaz
from (select v7_2 as 'Type5', 0 as 'Otkaz' from usktable group by Type5 union all
select v7_2 as 'Type5', count(v7_2) as 'Otkaz'
from usktable where (v13_1 = 2) and (v11_1 between %1 and %2) group by Type5) group by Type5) on (Type5=_Type)
join (select Type6, Prekrasheno
from (select v7_2 as 'Type6', null as 'Prekrasheno' from usktable group by Type6 union all
select v7_2 as 'Type6', count(v7_2) as 'Prekrasheno'
from usktable where (v13_1 = 3) and (v11_1 between %1 and %2) group by Type6) group by Type6) on (Type6=_Type)
join (select Type7, BezRas
from (select v7_2 as 'Type7', null as 'BezRas' from usktable group by Type7 union all
select v7_2 as 'Type7', count(v7_2) as 'BezRas'
from usktable where (v13_1 = 4) and (v11_1 between %1 and %2) group by Type7) group by Type7) on (Type7=_Type)
join (select Type8, Peredano
from (select v7_2 as 'Type8', null as 'Peredano' from usktable group by Type8 union all
select v7_2 as 'Type8', count(v7_2) as 'Peredano'
from usktable where (v13_1 = 5) and (v11_1 between %1 and %2) group by Type8) group by Type8) on (Type8=_Type)
join (select Type9, gr10
from (select v7_2 as 'Type9', null as 'gr10' from usktable group by Type9 union all
select v7_2 as 'Type9', count(v7_2) as 'gr10'
from usktable where (v20_1 = 1) and (v11_1 between %1 and %2) group by Type9) group by Type9) on (Type9=_Type)
join (select Type10, OstatokNeokon
from (select v7_2 as 'Type10', null as 'OstatokNeokon' from usktable group by Type10 union all
select v7_2 as 'Type10', count(v7_2) as 'OstatokNeokon'
from usktable where (v11_1 = 0) group by Type10) group by Type10) on (Type10=_Type)
join (select Type11, Priostanov
from (select v7_2 as 'Type11', null as 'Priostanov' from usktable group by Type11 union all
select v7_2 as 'Type11', count(v7_2) as 'Priostanov'
from usktable where ((v10_1 <> 0 or v10_4 <>0) and (v10_8 = 0)) and (v11_1 between %1 and %2) group by Type11) group by Type11) on (Type11=_Type)
join (select Type12, SummaChastOpred
from (select v7_2 as 'Type12', null as 'SummaChastOpred' from usktable group by Type12 union all
select v7_2 as 'Type12', sum(v15_1) as 'SummaChastOpred'
from usktable where (v11_1 between %1 and %2) group by Type12) group by Type12) on (Type12=_Type)
join (select Type13, SummaUdovl
from (select v7_2 as 'Type13', null as 'SummaUdovl' from usktable group by Type13 union all
select v7_2 as 'Type13', sum(v14_1_1) as 'SummaUdovl'
from usktable where (v11_1 between %1 and %2) group by Type13) group by Type13) on (Type13=_Type)
join (select Type14, SummaPoshlina
from (select v7_2 as 'Type14', null as 'SummaPoshlina' from usktable group by Type14 union all
select v7_2 as 'Type14', sum(v14_2_1) as 'SummaPoshlina'
from usktable where (v11_1 between %1 and %2) group by Type14) group by Type14) on (Type14=_Type)
join (select Type15, GosPoshlina
from (select v7_2 as 'Type15', null as 'GosPoshlina' from usktable group by Type15 union all
select v7_2 as 'Type15', sum(v3_1) as 'GosPoshlina'
from usktable where (v11_1 between %1 and %2) group by Type15) group by Type15) on (Type15=_Type)
group by _Type
union all
select _Type, _Last as 'Неоконченные на начало[1]', This as 'Поступило в этом[2]', Udovl+Otkaz as 'Всего[3]', Udovl as 'С удовлетворением[4]', Gr4 as 'Приказы[5]', Otkaz as 'Отказ в удовл.[6]', Prekrasheno as 'Прекращено[7]',
BezRas as 'Без рассмотрения[8]', Peredano as 'По подсудности[9]', gr10 as 'Свыше сроков[11]',OstatokNeokon as 'Остаток неокон.[12]', Priostanov as 'Приостановлено[13]', SummaChastOpred as 'Частные определения[14]',GosPoshlina as 'Г/П при подаче[15]',SummaUdovl as 'Присуждено[16]', SummaPoshlina as 'Г/П вдоход гос.[17]'
from (select 'Физ. к Юр.' as _Type)
join (select count(id) as 'This' from usktable where (v1_1 between %1 and %2) and ((v6_1=0 and v6_4=2) or (v6_1=0 and v6_4=1)))
join (select count(id) as '_Last' from usktable where (v1_1 between %3 and %4) and ((v11_1 = 0) or (v11_1 between %1 and %2)) and ((v6_1=0 and v6_4=2) or (v6_1=0 and v6_4=1)))
join (select count(id) as 'Itogo' from usktable where (v11_1 <>0) and (v11_1 between %1 and %2) and ((v6_1=0 and v6_4=2) or (v6_1=0 and v6_4=1)))
join (select count(id) as 'Udovl' from usktable where (v13_1 = 1) and (v11_1 between %1 and %2) and ((v6_1=0 and v6_4=2) or (v6_1=0 and v6_4=1)))
join (select count(id) as 'Gr4' from usktable where (v12_1 = 2) and (v11_1 between %1 and %2) and ((v6_1=0 and v6_4=2) or (v6_1=0 and v6_4=1)))
join (select count(id) as 'Otkaz' from usktable where (v13_1 = 2) and (v11_1 between %1 and %2) and ((v6_1=0 and v6_4=2) or (v6_1=0 and v6_4=1)))
join (select count(id) as 'Prekrasheno' from usktable where (v13_1 = 3) and (v11_1 between %1 and %2) and ((v6_1=0 and v6_4=2) or (v6_1=0 and v6_4=1)))
join (select count(id) as 'BezRas' from usktable where (v13_1 = 4) and (v11_1 between %1 and %2) and ((v6_1=0 and v6_4=2) or (v6_1=0 and v6_4=1)))
join (select count(id) as 'Peredano' from usktable where (v13_1 = 5) and (v11_1 between %1 and %2) and ((v6_1=0 and v6_4=2) or (v6_1=0 and v6_4=1)))
join (select count(id) as 'gr10' from usktable where (v20_1 = 1) and (v11_1 between %1 and %2) and ((v6_1=0 and v6_4=2) or (v6_1=0 and v6_4=1)))
join (select count(id) as 'OstatokNeokon' from usktable where (v11_1 = 0) and ((v6_1=0 and v6_4=2) or (v6_1=0 and v6_4=1)))
join (select count(id) as 'Priostanov' from usktable where ((v10_1 <> 0 or v10_4 <>0) and (v10_8 = 0)) and (v11_1 between %1 and %2) and ((v6_1=0 and v6_4=2) or (v6_1=0 and v6_4=1)))
join (select sum(v15_1) as 'SummaChastOpred' from usktable where (v11_1 between %1 and %2) and ((v6_1=0 and v6_4=2) or (v6_1=0 and v6_4=1)))
join (select sum(v14_1_1) as 'SummaUdovl' from usktable where (v11_1 between %1 and %2) and ((v6_1=0 and v6_4=2) or (v6_1=0 and v6_4=1)))
join (select sum(v14_2_1) as 'SummaPoshlina' from usktable where (v11_1 between %1 and %2) and ((v6_1=0 and v6_4=2) or (v6_1=0 and v6_4=1)))
join (select sum(v3_1) as 'GosPoshlina' from usktable where (v11_1 between %1 and %2) and ((v6_1=0 and v6_4=2) or (v6_1=0 and v6_4=1)))
union all
select _Type, _Last as 'Неоконченные на начало[1]', This as 'Поступило в этом[2]', Udovl+Otkaz as 'Всего[3]', Udovl as 'С удовлетворением[4]', Gr4 as 'Приказы[5]', Otkaz as 'Отказ в удовл.[6]', Prekrasheno as 'Прекращено[7]',
BezRas as 'Без рассмотрения[8]', Peredano as 'По подсудности[9]', gr10 as 'Свыше сроков[11]',OstatokNeokon as 'Остаток неокон.[12]', Priostanov as 'Приостановлено[13]', SummaChastOpred as 'Частные определения[14]',GosPoshlina as 'Г/П при подаче[15]',SummaUdovl as 'Присуждено[16]', SummaPoshlina as 'Г/П вдоход гос.[17]'
from (select '- из них к гос. органам' as _Type)
join (select count(id) as 'This' from usktable where (v1_1 between %1 and %2) and (v6_1=0 and v6_4=2))
join (select count(id) as '_Last' from usktable where (v1_1 between %3 and %4) and ((v11_1 = 0) or (v11_1 between %1 and %2)) and (v6_1=0 and v6_4=2))
join (select count(id) as 'Itogo' from usktable where (v11_1 <>0) and (v11_1 between %1 and %2) and (v6_1=0 and v6_4=2))
join (select count(id) as 'Udovl' from usktable where (v13_1 = 1) and (v11_1 between %1 and %2) and (v6_1=0 and v6_4=2))
join (select count(id) as 'Gr4' from usktable where (v12_1 = 2) and (v11_1 between %1 and %2) and (v6_1=0 and v6_4=2))
join (select count(id) as 'Otkaz' from usktable where (v13_1 = 2) and (v11_1 between %1 and %2) and (v6_1=0 and v6_4=2))
join (select count(id) as 'Prekrasheno' from usktable where (v13_1 = 3) and (v11_1 between %1 and %2) and (v6_1=0 and v6_4=2))
join (select count(id) as 'BezRas' from usktable where (v13_1 = 4) and (v11_1 between %1 and %2) and (v6_1=0 and v6_4=2))
join (select count(id) as 'Peredano' from usktable where (v13_1 = 5) and (v11_1 between %1 and %2) and (v6_1=0 and v6_4=2))
join (select count(id) as 'gr10' from usktable where (v20_1 = 1) and (v11_1 between %1 and %2) and (v6_1=0 and v6_4=2))
join (select count(id) as 'OstatokNeokon' from usktable where (v11_1 = 0) and (v6_1=0 and v6_4=2))
join (select count(id) as 'Priostanov' from usktable where ((v10_1 <> 0 or v10_4 <>0) and (v10_8 = 0)) and (v11_1 between %1 and %2) and (v6_1=0 and v6_4=2))
join (select sum(v15_1) as 'SummaChastOpred' from usktable where (v11_1 between %1 and %2) and (v6_1=0 and v6_4=2))
join (select sum(v14_1_1) as 'SummaUdovl' from usktable where (v11_1 between %1 and %2) and (v6_1=0 and v6_4=2))
join (select sum(v14_2_1) as 'SummaPoshlina' from usktable where (v11_1 between %1 and %2) and (v6_1=0 and v6_4=2))
join (select sum(v3_1) as 'GosPoshlina' from usktable where (v11_1 between %1 and %2) and (v6_1=0 and v6_4=2))
union all
select _Type, _Last as 'Неоконченные на начало[1]', This as 'Поступило в этом[2]', Udovl+Otkaz as 'Всего[3]', Udovl as 'С удовлетворением[4]', Gr4 as 'Приказы[5]', Otkaz as 'Отказ в удовл.[6]', Prekrasheno as 'Прекращено[7]',
BezRas as 'Без рассмотрения[8]', Peredano as 'По подсудности[9]', gr10 as 'Свыше сроков[11]',OstatokNeokon as 'Остаток неокон.[12]', Priostanov as 'Приостановлено[13]', SummaChastOpred as 'Частные определения[14]',GosPoshlina as 'Г/П при подаче[15]',SummaUdovl as 'Присуждено[16]', SummaPoshlina as 'Г/П вдоход гос.[17]'
from (select 'Юр. к физ.' as _Type)
join (select count(id) as 'This' from usktable where (v1_1 between %1 and %2) and ((v6_1=1 and v6_4=0) or (v6_1=2 and v6_4=0)))
join (select count(id) as '_Last' from usktable where (v1_1 between %3 and %4) and ((v11_1 = 0) or (v11_1 between %1 and %2)) and ((v6_1=1 and v6_4=0) or (v6_1=2 and v6_4=0)))
join (select count(id) as 'Itogo' from usktable where (v11_1 <>0) and (v11_1 between %1 and %2) and ((v6_1=1 and v6_4=0) or (v6_1=2 and v6_4=0)))
join (select count(id) as 'Udovl' from usktable where (v13_1 = 1) and (v11_1 between %1 and %2) and ((v6_1=1 and v6_4=0) or (v6_1=2 and v6_4=0)))
join (select count(id) as 'Gr4' from usktable where (v12_1 = 2) and (v11_1 between %1 and %2) and ((v6_1=1 and v6_4=0) or (v6_1=2 and v6_4=0)))
join (select count(id) as 'Otkaz' from usktable where (v13_1 = 2) and (v11_1 between %1 and %2) and ((v6_1=1 and v6_4=0) or (v6_1=2 and v6_4=0)))
join (select count(id) as 'Prekrasheno' from usktable where (v13_1 = 3) and (v11_1 between %1 and %2) and ((v6_1=1 and v6_4=0) or (v6_1=2 and v6_4=0)))
join (select count(id) as 'BezRas' from usktable where (v13_1 = 4) and (v11_1 between %1 and %2) and ((v6_1=1 and v6_4=0) or (v6_1=2 and v6_4=0)))
join (select count(id) as 'Peredano' from usktable where (v13_1 = 5) and (v11_1 between %1 and %2) and ((v6_1=1 and v6_4=0) or (v6_1=2 and v6_4=0)))
join (select count(id) as 'gr10' from usktable where (v20_1 = 1) and (v11_1 between %1 and %2) and ((v6_1=1 and v6_4=0) or (v6_1=2 and v6_4=0)))
join (select count(id) as 'OstatokNeokon' from usktable where (v11_1 = 0) and ((v6_1=1 and v6_4=0) or (v6_1=2 and v6_4=0)))
join (select count(id) as 'Priostanov' from usktable where ((v10_1 <> 0 or v10_4 <>0) and (v10_8 = 0)) and (v11_1 between %1 and %2) and ((v6_1=1 and v6_4=0) or (v6_1=2 and v6_4=0)))
join (select sum(v15_1) as 'SummaChastOpred' from usktable where (v11_1 between %1 and %2) and ((v6_1=1 and v6_4=0) or (v6_1=2 and v6_4=0)))
join (select sum(v14_1_1) as 'SummaUdovl' from usktable where (v11_1 between %1 and %2) and ((v6_1=1 and v6_4=0) or (v6_1=2 and v6_4=0)))
join (select sum(v14_2_1) as 'SummaPoshlina' from usktable where (v11_1 between %1 and %2) and ((v6_1=1 and v6_4=0) or (v6_1=2 and v6_4=0)))
join (select sum(v3_1) as 'GosPoshlina' from usktable where (v11_1 between %1 and %2) and ((v6_1=1 and v6_4=0) or (v6_1=2 and v6_4=0)))
union all
select _Type, _Last as 'Неоконченные на начало[1]', This as 'Поступило в этом[2]', Udovl+Otkaz as 'Всего[3]', Udovl as 'С удовлетворением[4]', Gr4 as 'Приказы[5]', Otkaz as 'Отказ в удовл.[6]', Prekrasheno as 'Прекращено[7]',
BezRas as 'Без рассмотрения[8]', Peredano as 'По подсудности[9]', gr10 as 'Свыше сроков[11]',OstatokNeokon as 'Остаток неокон.[12]', Priostanov as 'Приостановлено[13]', SummaChastOpred as 'Частные определения[14]',GosPoshlina as 'Г/П при подаче[15]',SummaUdovl as 'Присуждено[16]', SummaPoshlina as 'Г/П вдоход гос.[17]'
from (select '- из них гос. органы к физ.' as _Type)
join (select count(id) as 'This' from usktable where (v1_1 between %1 and %2) and (v6_1=2 and v6_4=0))
join (select count(id) as '_Last' from usktable where (v1_1 between %3 and %4) and ((v11_1 = 0) or (v11_1 between %1 and %2)) and (v6_1=2 and v6_4=0))
join (select count(id) as 'Itogo' from usktable where (v11_1 <>0) and (v11_1 between %1 and %2) and (v6_1=2 and v6_4=0))
join (select count(id) as 'Udovl' from usktable where (v13_1 = 1) and (v11_1 between %1 and %2) and (v6_1=2 and v6_4=0))
join (select count(id) as 'Gr4' from usktable where (v12_1 = 2) and (v11_1 between %1 and %2) and (v6_1=2 and v6_4=0))
join (select count(id) as 'Otkaz' from usktable where (v13_1 = 2) and (v11_1 between %1 and %2) and (v6_1=2 and v6_4=0))
join (select count(id) as 'Prekrasheno' from usktable where (v13_1 = 3) and (v11_1 between %1 and %2) and (v6_1=2 and v6_4=0))
join (select count(id) as 'BezRas' from usktable where (v13_1 = 4) and (v11_1 between %1 and %2) and (v6_1=2 and v6_4=0))
join (select count(id) as 'Peredano' from usktable where (v13_1 = 5) and (v11_1 between %1 and %2) and (v6_1=2 and v6_4=0))
join (select count(id) as 'gr10' from usktable where (v20_1 = 1) and (v11_1 between %1 and %2) and (v6_1=2 and v6_4=0))
join (select count(id) as 'OstatokNeokon' from usktable where (v11_1 = 0) and (v6_1=2 and v6_4=0))
join (select count(id) as 'Priostanov' from usktable where ((v10_1 <> 0 or v10_4 <>0) and (v10_8 = 0)) and (v11_1 between %1 and %2) and (v6_1=2 and v6_4=0))
join (select sum(v15_1) as 'SummaChastOpred' from usktable where (v11_1 between %1 and %2) and (v6_1=2 and v6_4=0))
join (select sum(v14_1_1) as 'SummaUdovl' from usktable where (v11_1 between %1 and %2) and (v6_1=2 and v6_4=0))
join (select sum(v14_2_1) as 'SummaPoshlina' from usktable where (v11_1 between %1 and %2) and (v6_1=2 and v6_4=0))
join (select sum(v3_1) as 'GosPoshlina' from usktable where (v11_1 between %1 and %2) and (v6_1=2 and v6_4=0))
union all
select _Type, _Last as 'Неоконченные на начало[1]', This as 'Поступило в этом[2]', Udovl+Otkaz as 'Всего[3]', Udovl as 'С удовлетворением[4]', Gr4 as 'Приказы[5]', Otkaz as 'Отказ в удовл.[6]', Prekrasheno as 'Прекращено[7]',
BezRas as 'Без рассмотрения[8]', Peredano as 'По подсудности[9]', gr10 as 'Свыше сроков[11]',OstatokNeokon as 'Остаток неокон.[12]', Priostanov as 'Приостановлено[13]', SummaChastOpred as 'Частные определения[14]',GosPoshlina as 'Г/П при подаче[15]',SummaUdovl as 'Присуждено[16]', SummaPoshlina as 'Г/П вдоход гос.[17]'
from (select 'Физ. к физ.' as _Type)
join (select count(id) as 'This' from usktable where (v1_1 between %1 and %2) and (v6_1=0 and v6_4=0))
join (select count(id) as '_Last' from usktable where (v1_1 between %3 and %4) and ((v11_1 = 0) or (v11_1 between %1 and %2)) and (v6_1=0 and v6_4=0))
join (select count(id) as 'Itogo' from usktable where (v11_1 <>0) and (v11_1 between %1 and %2) and (v6_1=0 and v6_4=0))
join (select count(id) as 'Udovl' from usktable where (v13_1 = 1) and (v11_1 between %1 and %2) and (v6_1=0 and v6_4=0))
join (select count(id) as 'Gr4' from usktable where (v12_1 = 2) and (v11_1 between %1 and %2) and (v6_1=0 and v6_4=0))
join (select count(id) as 'Otkaz' from usktable where (v13_1 = 2) and (v11_1 between %1 and %2) and (v6_1=0 and v6_4=0))
join (select count(id) as 'Prekrasheno' from usktable where (v13_1 = 3) and (v11_1 between %1 and %2) and (v6_1=0 and v6_4=0))
join (select count(id) as 'BezRas' from usktable where (v13_1 = 4) and (v11_1 between %1 and %2) and (v6_1=0 and v6_4=0))
join (select count(id) as 'Peredano' from usktable where (v13_1 = 5) and (v11_1 between %1 and %2) and (v6_1=0 and v6_4=0))
join (select count(id) as 'gr10' from usktable where (v20_1 = 1) and (v11_1 between %1 and %2) and (v6_1=0 and v6_4=0))
join (select count(id) as 'OstatokNeokon' from usktable where (v11_1 = 0) and (v6_1=0 and v6_4=0))
join (select count(id) as 'Priostanov' from usktable where ((v10_1 <> 0 or v10_4 <>0) and (v10_8 = 0)) and (v11_1 between %1 and %2) and (v6_1=0 and v6_4=0))
join (select sum(v15_1) as 'SummaChastOpred' from usktable where (v11_1 between %1 and %2) and (v6_1=0 and v6_4=0))
join (select sum(v14_1_1) as 'SummaUdovl' from usktable where (v11_1 between %1 and %2) and (v6_1=0 and v6_4=0))
join (select sum(v14_2_1) as 'SummaPoshlina' from usktable where (v11_1 between %1 and %2) and (v6_1=0 and v6_4=0))
join (select sum(v3_1) as 'GosPoshlina' from usktable where (v11_1 between %1 and %2) and (v6_1=0 and v6_4=0))

------------ Дoбавленo в 09.45:
nesco писал(а):
Для этого есть нештатный KOL, никто не мешает его использовать тому, кто жить не может без прозрачности
или перейти на Delphi. Тоже никто не мешает.
Был бы ParentColor (который я да-авно предлагал) не прозрачность, но тоже вариант.
карма: 25
Немного терпения! Дежурный экстрасенс скоро свяжется с Вами!
0