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.
127 lines
4.9 KiB
127 lines
4.9 KiB
47170^Absolvent*innen nach Geschlecht und Nationalität^--Freemarker Template\ |
|
<#include "SQL_lingua_franca"/>\ |
|
<#include "SuperX_general"/>\ |
|
\ |
|
create temp table tmp_absolv1 \ |
|
(jahr integer,\ |
|
hs_nr char(10),\ |
|
spalte char(255),\ |
|
gesamt integer,\ |
|
nicht_w_gesamt integer, w_gesamt integer,\ |
|
nicht_a_gesamt integer, a_gesamt integer)\ |
|
<@informixnolog/>;\ |
|
\ |
|
create temp table tmp_absolv2 \ |
|
(jahr integer,\ |
|
hs_nr char(10),\ |
|
gesamt integer,\ |
|
nicht_w_gesamt integer, w_gesamt integer,\ |
|
nicht_a_gesamt integer, a_gesamt integer)\ |
|
<@informixnolog/>;\ |
|
\ |
|
\ |
|
\ |
|
insert into tmp_absolv1(jahr,\ |
|
hs_nr ,\ |
|
gesamt,\ |
|
w_gesamt ,\ |
|
nicht_w_gesamt, \ |
|
nicht_a_gesamt,\ |
|
a_gesamt)\ |
|
select jahr,\ |
|
hs_nr,\ |
|
sum(gesamt) ,\ |
|
(case when geschlecht_w=1 then sum(gesamt) else 0 end) as absolv_w_gesamt,\ |
|
(case when geschlecht_w=0 then sum(gesamt) else 0 end) as absolv_nicht_w_gesamt,\ |
|
(case when nationalitaet_a=0 then sum(gesamt) else 0 end) as absolv_nicht_a_gesamt,\ |
|
(case when nationalitaet_a=1 then sum(gesamt) else 0 end) as absolv_a_gesamt\ |
|
from sxc_lab_jahr_da_geschl_hs_aggr\ |
|
where 1=1\ |
|
and bestanden_j=1\ |
|
/* and jahr >= <<Seit Semester>>*/\ |
|
/* and jahr <= <<Bis Semester>> */\ |
|
/* and hs_nr::varchar(255) in <@printkeys Hochschule.allNeededKeysList/> --<<Hochschule>> */\ |
|
group by 1,2,\ |
|
geschlecht_w,\ |
|
nationalitaet_a\ |
|
;\ |
|
\ |
|
\ |
|
\ |
|
\ |
|
insert into tmp_absolv2(jahr,\ |
|
gesamt,\ |
|
nicht_w_gesamt, \ |
|
w_gesamt ,\ |
|
nicht_a_gesamt,\ |
|
a_gesamt)\ |
|
select S.jahr,\ |
|
sum(gesamt),\ |
|
sum(nicht_w_gesamt),\ |
|
sum(w_gesamt),\ |
|
sum(nicht_a_gesamt),\ |
|
sum(a_gesamt)\ |
|
from tmp_absolv1 S\ |
|
group by 1;\ |
|
drop table tmp_absolv1;\ |
|
\ |
|
-- Falls Division durch 0 vorkommen sollte, Division durch NULL ist möglich\ |
|
update tmp_absolv2\ |
|
set gesamt = null where gesamt = 0;\ |
|
\ |
|
select jahr, \ |
|
gesamt,\ |
|
w_gesamt,\ |
|
nicht_w_gesamt,\ |
|
'' || w_gesamt || '|' || gesamt as _graphbarright_w_gesamt,\ |
|
'' || nicht_w_gesamt || '|' || gesamt as _graphbarleft_nicht_w_gesamt,\ |
|
round((100*w_gesamt)::decimal(21,9)/gesamt,2) as frauenanteil,\ |
|
nicht_a_gesamt,\ |
|
a_gesamt,\ |
|
'' || nicht_a_gesamt || '|' || gesamt as _graphbarright_nicht_a_gesamt,\ |
|
'' || a_gesamt || '|' || gesamt as _graphbarleft_a_gesamt,\ |
|
round((100*a_gesamt)::decimal(21,9)/gesamt,2) as auslanteil\ |
|
from tmp_absolv2 \ |
|
order by jahr desc ;^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="Semester" explanation="@@@sos_jahr@@@" center_heading\ |
|
row_selectable heading_platform readonly\ |
|
width=10\ |
|
Column CID=1 heading_text="Gesamtzahl" explanation="@@@sos_gesamtzahl@@@" center_heading\ |
|
row_selectable col_selectable rightJust heading_platform\ |
|
readonly\ |
|
width=8\ |
|
Column CID=2 heading_text="Absolvent*innen nach Geschlecht\\000weiblich" explanation="" center_heading\ |
|
row_selectable col_selectable rightJust heading_platform readonly\ |
|
width=8\ |
|
Column CID=2 heading_text="Absolvent*innen nach Geschlecht\\000nicht weiblich" explanation="" center_heading\ |
|
row_selectable col_selectable rightJust heading_platform readonly\ |
|
width=8\ |
|
Column CID=2 heading_text="Absolvent*innen nach Geschlecht\\000weiblich\\n(graphisch)" explanation="" center_heading\ |
|
row_selectable col_selectable rightJust heading_platform readonly\ |
|
width=8\ |
|
Column CID=2 heading_text="Absolvent*innen nach Geschlecht\\000nicht weiblich\\n(graphisch)" explanation="" center_heading\ |
|
row_selectable col_selectable rightJust heading_platform readonly\ |
|
width=8\ |
|
Column CID=3 heading_text="Absolvent*innen nach Geschlecht\\000Anteil weibl. in %" explanation="" center_heading\ |
|
row_selectable col_selectable rightJust heading_platform readonly\ |
|
width=8\ |
|
Column CID=2 heading_text="Absolvent*innen nach Nationalität\\000Deutsch" explanation="" center_heading\ |
|
row_selectable col_selectable rightJust heading_platform readonly\ |
|
width=8\ |
|
Column CID=2 heading_text="Absolvent*innen nach Nationalität\\000Ausland" explanation="" center_heading\ |
|
row_selectable col_selectable rightJust heading_platform readonly\ |
|
width=8\ |
|
Column CID=2 heading_text="Absolvent*innen nach Nationalität\\000Deutsch\\n(graphisch)" explanation="" center_heading\ |
|
row_selectable col_selectable rightJust heading_platform readonly\ |
|
width=8\ |
|
Column CID=2 heading_text="Absolvent*innen nach Nationalität\\000Ausland\\n(graphisch)" explanation="" center_heading\ |
|
row_selectable col_selectable rightJust heading_platform readonly\ |
|
width=8\ |
|
Column CID=3 heading_text="Absolvent*innen nach Nationalität\\000Anteil Ausland in %" explanation="" center_heading\ |
|
row_selectable col_selectable rightJust heading_platform readonly\ |
|
width=8\ |
|
@@@^Semester^Anzahl^Absolvent*innen je Semester mit Geschlechtsangabe und Prozentwert. Quelle der Daten: @@@destatis_21311@@@^drop table tmp_absolv2;^^3^700^360^^1^<<SQL>> select distinct 'Quelle: Destatis Tabelle ' || statistics_label || '(' || statistics_code || ')' from sxc_lab_jahr_da_geschl_hs^
|
|
|