Tuesday, 16 August 2016

OVER PARTITION ..... ROW_NUMBER Example in POSTGRES

select * from (
SELECT "PROCE_UNIT_C" ,"EQUI_C" ,"COMPO_C" ,"COMPO_TYPE_C","CUIF_INS_CAT",
row_number() over(PARTITION BY "PROCE_UNIT_C", "EQUIP_C","COMPO_C","COMPO_TYPE_C","CUIF_INS_CAT")  "Row_Number",
count("CUIF_INS_CAT") over(PARTITION BY "PROCE_UNIT_C", "EQUI_C","COMPO_C","COMPO_TYPE_C","CUIF_INS_CAT"),
CHR(min(ASCII("CUIF_INS_CAT")) over(PARTITION BY "PROCE_UNIT_C", "EQUI_C","COMPO_C","COMPO_TYPE_C"))
FROM
"INSPHISTORY" ) "a"
where "a"."Row_Number"=1

get it

 http://hinekv1.ddns.net:8008/get.php?username=Varga_Florentina1tv&password=j5MgWBs18t&type=m3u_plus&output=mpegts http://www.lo...