47000^Studierende nach Geschlecht und Nationalität^--Freemarker Template\ <#include "SQL_lingua_franca"/>\ <#include "SuperX_general"/>\ \ create temp table tmp_studis1 \ (semester integer,\ hs_nr char(10),\ spalte char(255),\ m_gesamt integer, w_gesamt integer,\ d_gesamt integer, a_gesamt integer)\ <@informixnolog/>;\ \ create temp table tmp_studis2 \ (semester integer,\ semester_str varchar(255),\ hs_nr char(10),\ gesamt integer,\ m_gesamt integer, w_gesamt integer,\ d_gesamt integer, a_gesamt integer)\ <@informixnolog/>;\ \ \ \ insert into tmp_studis1(semester,\ hs_nr ,\ m_gesamt, \ w_gesamt ,\ d_gesamt,\ a_gesamt)\ select semester,\ hs_nr,\ (case when auspraegung_code_3='GESM' then bil002__studierende__anzahl else 0 end) as m_gesamt,\ (case when auspraegung_code_3='GESW' then bil002__studierende__anzahl else 0 end) as w_gesamt,\ (case when auspraegung_code_2='NATD' then bil002__studierende__anzahl else 0 end) as d_gesamt,\ (case when auspraegung_code_2='NATA' then bil002__studierende__anzahl else 0 end) as a_gesamt\ from sxc_stud_sem_da_geschl_hs\ where bil002__studierende__q='e' --endgültiger Wert\ /* and semester >= <>*/\ /* and semester <= <> */\ /* and hs_nr::varchar(255) in <@printkeys Hochschule.allNeededKeysList/> --<> */\ ;\ \ \ \ \ insert into tmp_studis2(semester,\ semester_str ,\ gesamt,\ m_gesamt, \ w_gesamt ,\ d_gesamt,\ a_gesamt)\ select S.semester,K.druck,\ sum(m_gesamt) + sum(w_gesamt),\ sum(m_gesamt),\ sum(w_gesamt),\ sum(d_gesamt),\ sum(a_gesamt)\ from tmp_studis1 S, kenn_semester K\ where K.tid=S.semester\ group by 1,2;\ drop table tmp_studis1;\ \ -- Falls Division durch 0 vorkommen sollte, Division durch NULL ist möglich\ update tmp_studis2\ set gesamt = null where gesamt = 0;\ \ select trim(semester_str), \ gesamt,\ w_gesamt,\ m_gesamt,\ '' || w_gesamt || '|' || gesamt as _graphbarright_w_gesamt,\ '' || m_gesamt || '|' || gesamt as _graphbarleft_m_gesamt,\ round((100*w_gesamt)::decimal(21,9)/gesamt,2) as frauenanteil,\ d_gesamt,\ a_gesamt,\ '' || d_gesamt || '|' || gesamt as _graphbarright_d_gesamt,\ '' || a_gesamt || '|' || gesamt as _graphbarleft_a_gesamt,\ round((100*a_gesamt)::decimal(21,9)/gesamt,2) as auslanteil\ from tmp_studis2 \ order by semester 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_semester@@@" 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="Studierende nach Geschlecht\\000weiblich" explanation="" center_heading\ row_selectable col_selectable rightJust heading_platform readonly\ width=8\ Column CID=2 heading_text="Studierende nach Geschlecht\\000männlich" explanation="" center_heading\ row_selectable col_selectable rightJust heading_platform readonly\ width=8\ Column CID=2 heading_text="Studierende nach Geschlecht\\000weiblich\\n(graphisch)" explanation="" center_heading\ row_selectable col_selectable rightJust heading_platform readonly\ width=8\ Column CID=2 heading_text="Studierende nach Geschlecht\\000männlich\\n(graphisch)" explanation="" center_heading\ row_selectable col_selectable rightJust heading_platform readonly\ width=8\ Column CID=3 heading_text="Studierende nach Geschlecht\\000Anteil weibl. in %" explanation="" center_heading\ row_selectable col_selectable rightJust heading_platform readonly\ width=8\ Column CID=2 heading_text="Studierende nach Nationalität\\000Deutsch" explanation="" center_heading\ row_selectable col_selectable rightJust heading_platform readonly\ width=8\ Column CID=2 heading_text="Studierende nach Nationalität\\000Ausland" explanation="" center_heading\ row_selectable col_selectable rightJust heading_platform readonly\ width=8\ Column CID=2 heading_text="Studierende nach Nationalität\\000Deutsch\\n(graphisch)" explanation="" center_heading\ row_selectable col_selectable rightJust heading_platform readonly\ width=8\ Column CID=2 heading_text="Studierende nach Nationalität\\000Ausland\\n(graphisch)" explanation="" center_heading\ row_selectable col_selectable rightJust heading_platform readonly\ width=8\ Column CID=3 heading_text="Studierende nach Nationalität\\000Anteil Ausland in %" explanation="" center_heading\ row_selectable col_selectable rightJust heading_platform readonly\ width=8\ @@@^Semester^Anzahl^je Semester mit Geschlechtsangabe und Prozentwert^drop table tmp_studis2;^-leer-^3^700^360^0^1^<> select distinct 'Quelle: Destatis Tabelle ' || statistik_label || '(' || statistik_code || ')' from sxc_stud_sem_da_geschl_hs^