If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > A Count of Counts??

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-05-03, 12:32
jdkitch jdkitch is offline
Registered User
 
Join Date: Nov 2003
Posts: 3
A Count of Counts??

I'm using Oracle. I have an inventory table with each record being a different inventory record, and each record includes the location within my warehouse. I need to get a count of locations that have 5 or more inventory records pointing to it.

Any pointers greatly appreciated!

Thanks,
jdk
Reply With Quote
  #2 (permalink)  
Old 12-05-03, 13:07
N-ary N-ary is offline
Registered User
 
Join Date: Oct 2003
Posts: 87
select count(*)
from
where
group by xxx having count(*) > 5
__________________
Oracle - DB2 - MS Access -
Reply With Quote
  #3 (permalink)  
Old 12-05-03, 19:50
jdkitch jdkitch is offline
Registered User
 
Join Date: Nov 2003
Posts: 3
Quote:
Originally posted by N-ary
select count(*)
from
where
group by xxx having count(*) > 5
Thanks!! I'm still validating results, but this appears to have been just what I needed.

jdk
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On