Results 1 to 2 of 2
  1. #1
    cad4321 Guest

    Default Getting count for each product and its name

    Hi,

    I am trying to get total number of products in different departmental stores and i also want to get the name of the product. I have this query.

    Select count(prod) as cnt, prodname from distribution
    not working

  2. #2
    Chand Guest

    Default

    use group by
    so
    Select count(prod) as cnt, prodname from distribution group by prodname
    you can't use count without group by

Bookmarks

Posting Permissions

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