Changes between Version 28 and Version 29 of Напредни извештаи од базата


Ignore:
Timestamp:
02/13/22 23:03:27 (3 years ago)
Author:
186102
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Напредни извештаи од базата

    v28 v29  
    131131== Број нарачки за секој квартал годинава ==
    132132{{{#!sql
    133 
     133select sum(prv.cnt) as Prv_Kvartal , sum(vtor.cnt1) as Vtor_Kvartal, sum(tret.cnt2) as Tret_Kvartal, sum(cetvrt.cnt3) as Cetvrt_Kvartal
     134from(
     135        select count(d.delivery_id) as cnt
     136        from project.delivery as d
     137        where extract(year from d.date) = extract(year from now()) and extract(month from d.date) <=3
     138        --group by d.date,d.delivery_id
     139)as prv,
     140(
     141        select count(d.delivery_id) as cnt1
     142        from project.delivery as d
     143        where extract(year from d.date) = extract(year from now()) and extract(month from d.date) > 3 and extract(month from d.date) <=6
     144        --group by d.date,d.client_id
     145)as vtor,
     146(
     147        select count(d.client_id) as cnt2
     148        from project.delivery as d
     149        where extract(year from d.date) = extract(year from now()) and extract(month from d.date) > 6 and extract(month from d.date) <=9
     150        --group by d.date,d.client_id
     151)as tret,
     152(
     153        select count(d.client_id) as cnt3
     154        from project.delivery as d
     155        where extract(year from d.date) = extract(year from now()) and extract(month from d.date) > 9 and extract(month from d.date) <=12
     156        --group by d.date,d.client_id
     157)as cetvrt
    134158}}}
    135159