sql simple question about a query


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: sql simple question about a query

  1. #1
    Rodolphe Pomerleau Guest

    sql simple question about a query


    Hi,

    I want to know if it's possible to put "ORDER BY" and "GROUP BY" in the
    same query (without UNION)?


    Thank you

    Rodolphe

  2. #2
    Michael Levy Guest

    Re: sql simple question about a query

    Sure

    USE pubs

    SELECT stor_id, SUM(qty) AS TotalSold
    FROM sales
    GROUP BY stor_id
    ORDER BY stor_id

    -Mike

    --
    Michael Levy MCSD, MCDBA, MCT
    Consultant
    GA Sullivan
    michaell@gasullivan.com

    "Rodolphe Pomerleau" <rod2d2@hotmail.com> wrote in message
    news:38f6286a$1@news.devx.com...
    >
    > Hi,
    >
    > I want to know if it's possible to put "ORDER BY" and "GROUP BY" in the
    > same query (without UNION)?
    >
    >
    > Thank you
    >
    > Rodolphe




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center