title: i am stuck with a query not able to get proper output
body: <pre><code>select G.region as Region
      ,A.Name as AgencyName 
      ,A.AgencyId
      ,sum(L.LoanAmount) as LoanAmount
  from dw.FFLoan L
  inner join dw.dimborrower B on L.BorrowerId = B.BorrowerId 
  inner join dw.DIMGeography G on G.GeographyId = B.GeographyId
  inner join dw.DIMAgency A on A.AgencyId = L.Agency
  group by G.region, A.Name, A.AgencyId
  order by  Region, LoanAmount desc
  </code></pre>
  
  <p>i am not able to get output in like 
  i first want first 5 east then 5 north and then south and then west.
  i need output only 5 region of each top loan amount</p>
  
  <p>thank you</p>