Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

'Order by' vs 'Group by'

 
Rao Raghu
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whats the difference between 'Order by' and 'Group by'in SQL? Where do we use each?
 
Arman Galustyan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gooooooogle
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34095
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Order by is for sorting.

Group by is for providing groups/sets of columns that you can provide some function on like count(*)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic