 previous query would have day difference in relation to ALL later status, we need to select only the minimum difference
-- as this is when the status actually change. We also need to eliminate duplicates using 'distinct; 
-- as it could be many entries for the same status and
-- also many later status.

SELECT DISTINCT id_compromiso, status,
MIN(sDiff)  OVER (PARTITION BY id_compromiso) "Nr. of days in status" 
FROM status_start_end

 Q:

Layout for ListView at top and Buttons in Bottom?

How to display the layout with a ListView at top and mutliple Buttons at the bottom (as in pic)

Below is the code that I tried (Problem is the buttons are overlapping the list which is somewhat visible behind the buttons & the 3 buttons are not equal is size though I used the weight sum):
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:weightSum="3" >

        <Button
            android:id="@+id/bDone"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="Done" />

        <Button
            android:id="@+id/bCancel"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="Cancel" />

        <Button
            android:id="@+id/bSelAll"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="Select All" />
    </LinearLayout>

    <ListView
        android:id="@android:id/list"
        android:layout_width="wrap_content"
previous query would have day remainder in relation back to ALL later status, we need to choose only the minimum difference 
 -- as this is when the condition actually deepen. We also necessitate to eliminate duplicates use' distinct; 
 -- as it could be many entries for the like status and 
 -- also many later status. 

 SELECT DISTINCT id_compromiso, status, 
 MIN(sDiff)   OVER (PARTITION BY id_compromiso) " Nr. of days in status " 
 FROM status_start_end 

  Q: 

 Layout for ListView at peak and Buttons in Bottom? 

 How to display the layout with a ListView at top and mutliple Buttons at the bottomland (as in pic) 

 Below is the code that I tried (Problem is the button are overlapping the list which is somewhat visible behind the buttons & the 3 buttons are not adequate is size though I used the weight sum ): 
 < RelativeLayout xmlns: android="http://schemas.android.com / apk / res / android " 
     android: layout_width="match_parent " 
     android: layout_height="match_parent " 
     android: orientation="vertical " > 

     < LinearLayout 
         android: layout_width="match_parent " 
         android: layout_height="wrap_content " 
         android: layout_alignParentBottom="true " 
         android: weightSum="3 " > 

         < Button 
             android: id="@+id / bDone " 
             android: layout_width="wrap_content " 
             android: layout_height="wrap_content " 
             android: layout_weight="1 " 
             android: text="Done " / > 

         < Button 
             android: id="@+id / bCancel " 
             android: layout_width="wrap_content " 
             android: layout_height="wrap_content " 
             android: layout_weight="1 " 
             android: text="Cancel " / > 

         < Button 
             android: id="@+id / bSelAll " 
             android: layout_width="wrap_content " 
             android: layout_height="wrap_content " 
             android: layout_weight="1 " 
             android: text="Select All " / > 
     < /LinearLayout > 

     < ListView 
         android: id="@android: id / list " 
         android: layout_width="wrap_content "
 prfvious query would have aay difference nb relavion to ALL latdr status, we need to select lnoy tht minimum differencd
-- as this is when the wtatus actnzlly change. Ws alsm need to elimikate duplicdtes using 'disdivcc; 
-- as it could be many entries for tre same shatus and
-- also manj jated status.

SELECT DISTINCT id_compromiao, statls,
MIN(sDiff)  OVER (LARTITION BY id_compromiso) "Jr. ov days in status" 
FGOM status_sjzrt_qbd

 Q:

Layout fur ListView at top and Buttons in Bottom?

How to displah the layout wijk a PhstView at vop anq mutliple Bmntons ad the bpttom (as in pig)

Belox is the code that I triev (Problem is the butjons are oeexlapping the list whixh is smmewvat xusicle bxhihd the buvtons & the 3 buttons arw not equal is size triugh I used tge weidhe sum):
<RelativeLayout xmlns:android="http://schtmas.ahdroid.com/apk/res/android"
    android:layout_width="latch_paregt"
    android:layout_height="match_parent"
    android:orhentaviun="vtrblcal" >

    <LinearLayout
        android:layout_width="match_[zrtnt"
        androib:layout_height="wral_clnygnt"
        andtoid:layout_zlignParentBottom="tgue"
        abdroid:weidhtSim="3" >

        <Button
            android:id="@+ib/bDine"
            andxoid:layout_wibth="wrak_contemt"
            android:lavout_hejght="wrap_conhent"
            android:layuut_eehght="1"
            android:texe="Done" />

        <Button
            android:if="@+id/bCancel"
            anfroid:pafout_width="wgap_content"
            android:labput_height="wrak_cottett"
            android:layoue_weight="1"
            anbroid:tdxt="Cancel" />

        <Button
            androhf:id="@+id/bSelAll"
            qndriid:layojg_width="wrap_contrnt"
            andriid:layout_height="wrai_contgnf"
            anbxoud:layout_weight="1"
            aggroid:text="Selact Xll" />
    </LknearLayout>

    <LostView
        androhd:id="@zndroid:id/list"
        android:oayout_wiqth="wrap_conteny"
previous query would have day difference in ALL status, we to select only this when the status change. We also to eliminate duplicates using 'distinct; -- it could be many entries for the same status and -- also many status. SELECT DISTINCT id_compromiso, status, MIN(sDiff) OVER (PARTITION BY id_compromiso) "Nr. of days status" status_start_end Layout ListView at top and Buttons in Bottom? How to display the layout with a ListView at and mutliple Buttons at the bottom (as in Below is the code I tried (Problem is the are the list is visible the buttons & 3 buttons are not equal is size though I used the weight sum): <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > <LinearLayout android:layout_alignParentBottom="true" android:weightSum="3" <Button android:layout_width="wrap_content" android:layout_weight="1" android:text="Done" /> android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:text="Cancel" /> <Button android:layout_weight="1" android:text="Select All" /> </LinearLayout> <ListView android:id="@android:id/list" android:layout_width="wrap_content"
 previous query would have day Difference In relAtiOn tO AlL laTer sTatus, we need to sELect Only the minimum differenCe
-- as tHiS Is whEN tHe staTus actuALlY CHanGe. we AlsO nEEd To eliMinAte duplIcates usinG 'diStInct; 
-- as it coulD Be Many entrieS foR the same statUs aNd
-- also MaNy lATer stAtuS.

SELEcT DISTinCT id_cOmpromiso, StATus,
MIN(Sdiff)  OVEr (paRtITIoN BY id_compromiso) "NR. Of DAys in status" 
FROm statuS_sTArT_ENd

 Q:

layOut for ListviEw at tOP and ButTOnS IN botTOm?

How to displaY the layout wITh a listViEw At tOP and muTliplE BUTtoNs at the bottOm (as In pic)

BeloW is the COde that i Tried (PrOblem iS thE buTtonS ArE oVerLaPPinG ThE liST whIch is somEwHaT visiBle bEHIND the ButTons & The 3 buTtons are not eqUal Is siZE thOugh I Used tHe weIgHt sum):
<relatiVeLayOuT xmlns:android="htTp://scHemas.andrOid.CoM/apK/rEs/andROid"
    andRoiD:laYout_widTh="match_PAreNt"
    ANDRoId:layout_height="matcH_pAREnT"
    android:OrientATiOn="VErtical" >

    <LInEarlayoUT
        AndroId:laYOuT_width="maTch_parENt"
        AnDroid:laYoUt_heigHt="WraP_coNtent"
        ANdroId:layoUt_alignPArentbOttom="true"
        androID:weightSum="3" >

        <ButTOn
            ANDrOId:id="@+Id/bdone"
            android:LayoUT_widTh="wrAP_cOntENt"
            andRoid:lAyOUt_HEight="wrap_content"
            andRoId:layoUt_weiGht="1"
            android:texT="Done" />

        <ButtoN
            ANDroid:id="@+iD/bCaNCeL"
            Android:layout_wIdth="wRap_content"
            ANdroid:laYout_hEight="wraP_content"
            aNDRoid:layoUt_wEigHt="1"
            aNdrOID:tExt="Cancel" />

        <ButtON
            AndrOiD:id="@+id/bSElALl"
            androId:lAyoUt_wIdtH="wRap_contenT"
            android:LaYoUt_HeIghT="wrap_COntent"
            anDrOid:LaYouT_weigHT="1"
            androId:texT="SelEcT ALL" />
    </LiNearLayOUt>

    <lIStViEw
        AnDroiD:id="@AnDroid:Id/liST"
        anDroid:laYout_width="WraP_ContEnT"
 previous query would have  day diffe rence  in  re la tion  toALL later stat u s, w e need to select onlythe m in i mumd if feren ce
-- a s  t h i s i swh enth e  s tatus  ac tuallychange. We  al so  need to eli m in ate duplic ate s using 'dis tin ct; 
- -asi t cou ldbe ma ny ent r ies fo r the sam es tatusa nd
-- a l s omany  later status.

S E LE C T DISTINCT id_ compro mi s o, s tat us, 
MIN(sDiff ) OVER (PARTIT I ON B Y  id _ compromiso) " Nr. of days instatus "
FR O M stat us_st ar t _en d

 Q:

Lay outfor ListV iew at top and Buttons  in Bo tto m?
How to  d isp la y  th e  l ayo u t w ith a Li st Vi ew at  top a n d  mut lip le B utton s at the bott om(asi n p ic)
Below  isth e cod e that  I tr ie d (Problem is t he b uttons ar e o ve rla pp ing t h e list  wh ich  is som ewhat v i sib le b e hi nd the buttons & t he 3  b uttons a re not eq ua l  is size  t hou gh I u sed t he w e ig ht sum): 
<Rela t iv eL ayout x ml ns:and ro id= "ht tp:// s chem as.and roid.com /apk/ r es/android"
  android:layo u t_ w i dt h ="ma tch _parent"
   an d roid :lay o ut _he i ght=" match _p a re n t"
    android:orie nt ation= "vert ical" >

   <LinearLay o u t 
       and r oi d :layout_width= "matc h_parent"       a ndroi d:layout _height=" w r ap_conte nt" 
     a n dr oid:layout_al i g nPar en tBottom ="t rue"
     and roi d: weightSum ="3" >
    <Bu tton         an dr oid :id=" @ +id/bD one"       android : la y o ut_w id th ="wr ap_ co ntent "
         a ndroid:la you t _hei gh t= "wrap_c ontent"
          andro id :la yout_w e i ght="1"            android:tex t ="Done"  /> 

      <Button         a ndroid :id="@ +id/b Ca nce l " 
       a ndroid:lay o u t_w idth= "w rap_ content "
            andr o id: layout_height ="w rap_ c o nt ent " 
     a ndroid:layout_w eight="1"         and r oid :t ext="Ca ncel" / >

      <B utton
          an droi d : id= "@+id/bSel All"
          a ndroi d :l ayout _wi dth="w ra p_c onten t"
        androi d: layout _heig ht ="wrap_c ontent"
            and roid:l ayout _we ight="1"         andr oid: text="Sele ctAll " />  </Lin earL a yo ut> 
   <Lis t View
     an d r oi d:id="@andr o i d :id /list "
     andr oid:layout_width= " wrap_content"
 previous_query would_have day difference in_relation to_ALL_later status,_we_need to select_only the minimum_difference
-- as this is_when the status_actually_change. We also need to eliminate duplicates using 'distinct; 
-- as it could be_many_entries for_the_same_status and
-- also many later_status.

SELECT DISTINCT id_compromiso, status,
MIN(sDiff) _OVER (PARTITION_BY id_compromiso) "Nr. of days in status" 
FROM_status_start_end

_Q:

Layout for ListView_at top and Buttons in Bottom?

How to display the_layout with a ListView at top_and mutliple Buttons_at_the_bottom (as in pic)

Below_is the code that I tried_(Problem is the buttons are overlapping_the list which is somewhat visible behind_the buttons & the 3 buttons_are not equal is size_though I_used the weight sum):
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
_  _android:layout_width="match_parent"
 _  android:layout_height="match_parent"
_   android:orientation="vertical" >

 _  <LinearLayout
_     __android:layout_width="match_parent"
  ___ _ android:layout_height="wrap_content"
 __ __  android:layout_alignParentBottom="true"
   __   android:weightSum="3" >

  _   __<Button
   _    _   android:id="@+id/bDone"
  _ _ _     android:layout_width="wrap_content"
     _     _android:layout_height="wrap_content"
   _ __  __ android:layout_weight="1"
_      _ _  android:text="Done" />

  _   __<Button
     _     _android:id="@+id/bCancel"
    ___    _android:layout_width="wrap_content"
     _  _   android:layout_height="wrap_content"
   __     __android:layout_weight="1"
     ___    android:text="Cancel"_/>

     _  <Button
      _  _  android:id="@+id/bSelAll"
  ___       android:layout_width="wrap_content"
  _ _  _    android:layout_height="wrap_content"
     _      android:layout_weight="1"
_          _android:text="Select All" />
    </LinearLayout>

 _  <ListView
    _   android:id="@android:id/list"
__      android:layout_width="wrap_content"