title: Make pagination in SQL with sorted records
body: <p>I have 100 records, and this records contains, username(string) and groupname(string). And I want to sort the whole records by groupname or by username. Is there an SQL query string that I can sort first the whole records then limit the number of records? Or is there any way to do this kind of method?</p>
  
  <p>Many thanks.</p>