Prepare for your Next Interview
This is a discussion on Query within the SQL forums, part of the Databases category; 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...
|
|||
|
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
|
| The Following 2 Users Say Thank You to K.K.Rajiv For This Useful Post: | ||
| Sponsored Links |
|
|||
|
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
__________________
Cheers, :) James:) |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Query | jescalante | Oracle | 4 | 06-25-2007 03:13 AM |
| Query with C++ | StephenRaj | C and C++ | 1 | 08-14-2006 05:09 AM |
| Query in ASP | timmy | ASP.NET | 1 | 07-26-2006 04:57 PM |
| Query on Size | scott | SQL | 0 | 07-26-2006 04:33 PM |
| Query with SQL Leading Zero | timmy | SQL | 2 | 07-17-2006 05:32 PM |