SQL - Count of deleted record in the file

By kimot, 24 December, 2022
SELECT DATA_SIZE,SYSTEM_TABLE_NAME, SYSTEM_TABLE_SCHEMA,NUMBER_ROWS, NUMBER_DELETED_ROWS              
       FROM QSYS2.SYSTABLESTAT                 
       WHERE SYSTEM_TABLE_SCHEMA = 'Library_name'
       ORDER BY NUMBER_DELETED_ROWS DESC       

 

                     Data   System      System                         Number                     Number  
                     Size   Table       Table                          Rows                       Deleted 
                            Name        Schema                                                    Rows    
           10,385,113,088   RAR22301    ARDNDAT102                 48,083,272                   1,541,441 
            2,088,775,680   TIR30101    ARDNDAT102                    729,192                     656,932 
              788,541,440   TOP00301    ARDNDAT102                  3,083,806                     279,955 
              998,252,544   ERPX0501    ARDNDAT102                  2,991,964                     277,294 
              159,387,648   DRP40601    ARDNDAT102                  2,520,338                     205,967 
              220,770,304   TIPO0501    ARDNDAT102                      3,085                     154,486 
              931,246,080   ERX40201    ARDNDAT102                  1,672,735                     150,413