SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Ascending and Descending Orders
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Praetorian
Starting Member

USA
3 Posts

Posted - 11/08/2013 :  16:21:53  Show Profile  Reply with Quote
Hi all. Ron here. I hope everyone is doing well. I'm OK but for a small problem understanding an assignment I've been given. You see, in the directions for a given problem, the instructor ask that the results be sorted with "the count column in descending order and name in ascending order." However, in the "results should look like this" document she sent out, I can see no order to the name column. Is there something I'm missing. If anyone can help point me in the right direction, I would appreciate it very much. Below is the desired output:

CUSTOMER# Name COUNT(*)
---------------------- --------------------- ----------------------
1001 BONITA MORALES 2
1003 LEILA SMITH 2
1005 CINDY GIRARD 2
1007 TAMMY GIANA 2
1010 JAKE LUCAS 2
1018 GREG MONTIASA 2
1020 KENNETH FALAH 2
1004 THOMAS PIERSON 1
1008 KENNETH JONES 1
1011 REESE MCGOVERN 1
1014 JASMINE LEE 1
1015 STEVE SCHELL 1
1017 BECCA NELSON 1
1019 JENNIFER SMITH 1

Praetorian
Starting Member

USA
3 Posts

Posted - 11/08/2013 :  16:40:43  Show Profile  Reply with Quote
My question is this: can anyone see any 'sort' or order to the name column?
Go to Top of Page

Lamprey
Flowing Fount of Yak Knowledge

4613 Posts

Posted - 11/08/2013 :  16:56:14  Show Profile  Reply with Quote
I don't see an order on the Name in the data you provided; Only an order by the COUNT(*) and then the Customer#.
Go to Top of Page

Praetorian
Starting Member

USA
3 Posts

Posted - 11/08/2013 :  17:03:32  Show Profile  Reply with Quote
Thanks Lamprey. I don't see any order to the Name data either. But the above list is what she expects our results to look like. My results look similar, in that the count is descending. Otherwise I don't see anything I can do with the names. (The names on my list are not in the same order.)
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000