IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Differnce between "GROUP BY" and ORDER BY


IBM Mainframe Forums -> HomeWorks & Requests
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
dipakgoyal
Warnings : 1

New User


Joined: 02 Aug 2007
Posts: 18
Location: Kolkata

PostPosted: Thu May 08, 2008 11:09 am
Reply with quote

What is the differnce between "GROUP BY" and " ORDER BY"?
Is "ORDER BY" more advantageous?
In which cases(s), we can't do with "ORDER BY" and have to use "GROUP BY"?
Back to top
View user's profile Send private message
the_gautam

Active User


Joined: 05 Jun 2005
Posts: 165
Location: Bangalore

PostPosted: Thu May 08, 2008 11:24 am
Reply with quote

GROUP BY and ORDER BY are two different things.

GROUP BY is used to group the selected rows according to a particular column data.

ORDER BY is used to sort the selected rows in ascending or descending order.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu May 08, 2008 1:48 pm
Reply with quote

If I say to look into manuals for such a basic stuff, am I being cynical..

You would do a favour actually if you become familiar to the manuals, attached vis the link "IBM Manuals" on the top of the page, second link from left.

Here are the pointers:

GROUP BY
ORDER BY
Back to top
View user's profile Send private message
dipakgoyal
Warnings : 1

New User


Joined: 02 Aug 2007
Posts: 18
Location: Kolkata

PostPosted: Fri Aug 01, 2008 1:51 pm
Reply with quote

Yes, you are being cynical.
Not because you are telling to look into the manaul
but because of the tone in which the reply is written.

You were not requested in person to reply to the question I had posted.
If you felt that the question was too basic,
you had the option of not answering to it.

The forum is not meant to criticize anyone, or to make him/her feel that he/she is asking silly doubts.

In fact, you would do a favour if you don't reply to the questions, or if you do, you do it in a proper way.

Last, and the most important
thanks for the link and the pointer
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Aug 01, 2008 2:26 pm
Reply with quote

Quote:

The forum is not meant to criticize anyone, or to make him/her feel that he/she is asking silly doubts.


The answers are readily available (via links to documents) thus making it obvious to those who spend time answering questions - for free - on our own time- that you are lazy. This is not a chat room.

Quote:

In fact, you would do a favour if you don't reply to the questions, or if you do, you do it in a proper way


do who a favor?? you?? Not only did you receive an 'nice' answer, but by one of the nicer people here.

if you don't like being directed to manuels, then don't ask questions that display the fact that you obviously think your time is more important than ours.

what you want for an answer is not always what you need to know/learn.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Fri Aug 01, 2008 2:53 pm
Reply with quote

Dipa,

Quote:
but because of the tone in which the reply is written.


Read your reply to anuj's post again and try to understand the tone.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Aug 01, 2008 3:02 pm
Reply with quote

dipakgoyal wrote:
Yes, you are being cynical.
I'll try to change my self, but I'm little typed by the time you posted your reactions..after three months I hope you've learned them now..

Later,


-Ad
Back to top
View user's profile Send private message
dipakgoyal
Warnings : 1

New User


Joined: 02 Aug 2007
Posts: 18
Location: Kolkata

PostPosted: Fri Aug 01, 2008 3:05 pm
Reply with quote

I also say "This is not a chat room".

But what you say and what you do are self-contradictory. You say "This is not a chat room", and then the language, expression and the tone ; all three are those of chat-room. So who is treating this as chat?

For the question "do who a favor?"
its not only me, but for everyone because no-one likes improper replies.

I can't make out the double-meaning of "nice answer". And as far as "nicer people" is concerned, he may be very knowledgable but not nice (to me atleast). He may be nice to you, so possibly that's why you are saying so.

I haven't said I don't like being directed to links. In fact, if you read carefully, I have thanked Anuj for the link (and I m not being sarcastic)

Last, but not the least, I fully agree with you in "what you want for an answer is not always what you need to know/learn."
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Aug 01, 2008 3:07 pm
Reply with quote

OK! thats enough
topic locked
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> HomeWorks & Requests

 


Similar Topics
Topic Forum Replies
No new posts PuTTY - "User is not a surrogate... IBM Tools 5
No new posts Rotate partition-logical & physic... DB2 0
No new posts Select two different counts from SQL... DB2 6
No new posts Newbie Stuck on "Duplicate Datas... TSO/ISPF 5
No new posts Compare latest 2 rows of a table usin... DB2 1
Search our Forums:

Back to Top