Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2005
    Posts
    5

    Unanswered: SQL's GROUPBY logic

    I'm attempting to code what amounts to a GROUPBY in SQL.

    Essentially I have a sort routine that I would like to modify so as to provide grouping by category.

    Does anyone know the logic SQL typically employs to effect groupby?

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    you'll need to give an example

    based on what you've said, ORDER BY is what you want
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jan 2005
    Posts
    5
    Quote Originally Posted by r937
    you'll need to give an example

    based on what you've said, ORDER BY is what you want
    You are entirely correct! Doh!

    I'll have n number of items each with a bitflag identifier, the bitflag being one of 7 possible values, and they need to be displayed in a predetermined order.

    I think that the entire reason for the post is now null as i should be able to accomplish what I need in the sorting.

    Thanks.

    I need to back away from the computer for a while now. LOL!!

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    a bitflag with 7 possible values? this i gotta see
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •