I need to write a SQL query to retrieve loan number, customer first name, customer last name, property address, and bankruptcy attorney name. I want all the records that have the same attorney name to be together, then the customer last name in order from Z-A (ex.Customer last name of wyatt comes before customer last name of Anderson.
my query goes like, please let me know if it works:
Select Loan number as Lnumber, customer first name as Fname, customer last name as Lname, property address as Padd, bankruptcy attorney name as BAttorneyname
group by Lnumber, Fname, Lname, Padd, BAttorneyname
order by BAttorneyname DESC