-
Junior Member
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
-
Expert Member
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
-
Junior Member
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;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules