Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Differnce between "GROUP BY" and ORDER BY

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> HomeWorks & Requests
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    Post subject: Differnce between "GROUP BY" and ORDER BY
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    Post subject:
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

Senior Member


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

PostPosted: Thu May 08, 2008 1:48 pm    Post subject:
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    Post subject: Reply to: Differnce between "GROUP BY" and ORDER B
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    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Fri Aug 01, 2008 2:53 pm    Post subject: Reply to: Differnce between "GROUP BY" and ORDER B
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

Senior Member


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

PostPosted: Fri Aug 01, 2008 3:02 pm    Post subject: Re: Reply to: Differnce between "GROUP BY" and ORD
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    Post subject: Reply to: Differnce between "GROUP BY" and ORDER B
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10234
Location: italy

PostPosted: Fri Aug 01, 2008 3:07 pm    Post subject: Reply to: Differnce between "GROUP BY" and ORDER B
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.    IBMMAINFRAMES.com Support Forums -> HomeWorks & Requests All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Why TS/OP would Not contact site supp... RahulG31 All Other Mainframe Topics 2 Wed Mar 22, 2017 7:46 am
No new posts Sorting group data rajella DFSORT/ICETOOL 4 Sun Jan 22, 2017 11:32 pm
No new posts Order BY AND Index Nileshkul DB2 2 Sat Dec 31, 2016 6:33 pm
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts Amount field is getting corrupted whe... thesumitk SYNCSORT 5 Tue Oct 18, 2016 8:20 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us