Revert "Fix the order by problem in the sub-query, add perplexity, and fix the possible INT32 overflow problem"

This reverts commit 456b9987daa47591f0c5ba75c1331cbd113e161b.