This Picard tool sorts the input SAM or BAM file by queryname (QNAME).
For more details, please check the home page of Picard tools.