Berichtsassistent
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

106 lines
3.4 KiB

44630^Dashboard Kopfzeile^--Freemarker Template\
<#include "SQL_lingua_franca"/>\
<#include "SuperX_general"/>\
--\
--Autor D. Quathamer 2024\
<#assign jahr_filter="1=1" />\
--Akad. Jahr 2022: WS + SS - Beispiel: WS 22/23 + SS 2023\
<#if "<<Jahr>>" !="">\
<#assign jahr_filter="(" />\
<#assign jahr_filter=jahr_filter + "(substring('' || sem_rueck_beur_ein from 5 for 1)='2' and val(substring('' || sem_rueck_beur_ein from 1 for 4))=<<Jahr>>)" />\
<#assign jahr_filter=jahr_filter + " or "/>\
<#assign jahr_filter=jahr_filter + "(substring('' || sem_rueck_beur_ein from 5 for 1)='1' and (val(substring('' || sem_rueck_beur_ein from 1 for 4))-1)=<<Jahr>>)" />\
<#assign jahr_filter=jahr_filter + ")" />\
</#if>\
\
<#assign filter="1=1\
/* and sem_rueck_beur_ein = <<Bis Semester>> */\
" />\
\
<#assign filter= filter + " and " + jahr_filter />\
\
<#assign stg_filter = " and 's_' || tid_stg in "+Studiengang.allNeededKeysList /> \
\
create temp table tmp_erg(\
ord integer,\
kennz varchar(255),\
wert integer,\
link_maskeninfo_id integer\
);\
\
insert into tmp_erg(ord,kennz,wert)\
select 1,'Bewerbungen',sum(summe)\
from zul_antr_aggr A\
where A.bewsem=<<Bis Semester>>\
and A.stg in (select L.stg from lehr_stg_ab L where 's_' || L.tid in <@printkeys Studiengang.allNeededKeysList/>)\
and A.abschl in (select L.abschluss from lehr_stg_ab L where 's_' || L.tid in <@printkeys Studiengang.allNeededKeysList/>)\
group by 1,2;\
\
\
insert into tmp_erg(ord,kennz,wert)\
select 10,'Studienanfänger*innen im 1. HS',sum(summe)\
from sos_stg_aggr S, sos_stichtag I\
where ${filter}\
and S.studiengang_nr=1\
and S.fach_nr=1\
and S.stichtag=I.tid\
and I.appl_key='0'\
and 's_' || S.tid_stg in <@printkeys Studiengang.allNeededKeysList/>\
and S.hssem=1\
group by 1,2;\
\
\
insert into tmp_erg(ord,kennz,wert)\
select 20,'Studierende gesamt',sum(summe)\
from sos_stg_aggr S, sos_stichtag I\
where ${filter}\
and S.studiengang_nr=1\
and S.fach_nr=1\
and S.stichtag=I.tid\
and I.appl_key='0'\
and 's_' || S.tid_stg in <@printkeys Studiengang.allNeededKeysList/>\
group by 1,2;\
\
\
insert into tmp_erg(ord,kennz,wert)\
select 30,'Studierende im Lehramt',sum(summe)\
from sos_stg_aggr S, sos_stichtag I, dim_studiengang D\
where ${filter}\
and S.studiengang_nr=1\
and S.fach_nr=1\
and S.stichtag=I.tid\
and D.tid=S.tid_stg\
and D.ist_lehramt=1\
and I.appl_key='0'\
and 's_' || S.tid_stg in <@printkeys Studiengang.allNeededKeysList/>\
group by 1,2;\
\
insert into tmp_erg(ord,kennz,wert)\
select 30,'Absolvent*innen',sum(summe)\
from sos_lab_aggr S, sos_stichtag I, dim_studiengang D\
where S.sem_der_pruefung=<<Bis Semester>>\
and S.studiengang_nr=1\
and S.fach_nr=1\
and S.stichtag=I.tid\
and D.tid=S.tid_stg\
and I.appl_key='2'\
and 's_' || S.tid_stg in <@printkeys Studiengang.allNeededKeysList/>\
group by 1,2;\
\
select kennz,wert,link_maskeninfo_id\
from tmp_erg\
order by ord;^XIL List\
sizable_columns horizontal_scrolling\
white_space_color=COLOR_WHITE fixed_columns=1\
drop_and_delete movable_columns\
min_heading_height=55\
Column CID=0 heading_text="Kennzahl" explanation="" center_heading\
row_selectable heading_platform readonly\
width=10\
Column CID=0 heading_text="Wert" explanation="" center_heading\
row_selectable heading_platform readonly\
width=30\
Column CID=0 heading_text="Maske" explanation="" center_heading\
row_selectable heading_platform readonly\
width=30\
@@@^ ^ ^Dashboard Inistialisierung^drop table tmp_erg;^^3^700^360^0^1^^