Results 1 to 3 of 3

Thread: Query

  1. #1
    Junior Member
    Join Date
    Apr 2007
    Answers
    28

    Query

    What will be the query for this: I have to find the total count of a particular customer ID occuring in a ,say, Sales Table


  2. #2
    Expert Member
    Join Date
    Jun 2006
    Answers
    410

    Re: Query

    it is quite simple,

    select cust_id, count(*) from supp
    group by cust_id;

    the above query displays each cust_id along with number of records in supp table for that custormer id


  3. #3
    Junior Member
    Join Date
    May 2007
    Answers
    2

    Re: Query

    The above solution gives the count of all customers with the same id....so

    select cust_id, count(*) from supp
    WHERE cust_id = <>
    group by cust_id;


  4.  Sponsored Ads
    Ad


     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact