In this study, a data-driven method for the construction of a reduced-order model (ROM) for complex flows is proposed. The method uses the proper orthogonal decomposition (POD) modes as the orthogonal basis and the dynamic mode decomposition method to obtain linear equations for the temporal evolution coefficients of the modes. This method eliminates the need for the governing equations of the flows involved, and therefore saves the effort of deriving the projected equations and proving their consistency, convergence and stability, as required by the conventional Galerkin projection method, which has been successfully applied to incompressible flows but is hard to extend to compressible flows. Using a sparsity-promoting algorithm, the dimensionality of the ROM is further reduced to a minimum. The ROMs of the natural and bypass transitions of supersonic boundary layers at $Ma=2.25$ are constructed by the proposed data-driven method. The temporal evolution of the POD modes shows good agreement with that obtained by direct numerical simulations in both cases.