Distributed computing environments provide considerable advantages for storing user data and performing computations, owing to their geographically dispersed nature. Within this framework, sorting data by frequency underpins numerous data aggregation and analysis tasks. Prior research aimed at mitigating privacy risks has largely focused on the application of cryptographic primitives for safeguarding data. Extending this body of work, this paper introduces an efficient algorithm for sorting data by frequency while maintaining a privacy-preserving aggregation state. The proposed method first leverages sketch theory to design a frequency-ranking algorithm for distributed data, which facilitates efficient information aggregation and sorting. Subsequently, privacy enhancements are incorporated into this frequency-ranking algorithm through additive secret sharing (ASS) and secure multi-party computation (SMPC). These cryptographic techniques enable private addition and summation operations on data distributed across multiple sources. The security of the proposed sketch-based frequency sorting algorithm (FSSketch) is evaluated within the semi-honest adversarial model. Furthermore, simulation experiments are performed utilizing the versatile multi-party computation framework (MP-SPDZ), an SMPC library. Results from these experiments indicate that FSSketch delivers superior efficiency and privacy. In comparison to alternative algorithms (P2SM and PPDA), FSSketch demonstrates a performance improvement exceeding an order of magnitude. Furthermore, the proposed FSSketch algorithm shows strong potential for real-world scenarios requiring privacy-preserving data processing, such as financial data analysis, medical data sharing, and intelligent urban management, thereby providing a reliable technical support for the broader application of privacy-preserving distributed computing.