Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

count (decode)

jhe-jheJan 29 2014 — edited Jan 30 2014

hi all,
I have a problem
If I have a table as below

TRANSACTION_DATEITEM_CODEITEM_DESCRIPTIONITEM_TYPEAMOUNT
1/30/2014 8:53:06 AM

1001

coconutfood2000
1/30/2014 8:53:06 AM1002peanutfood3000
1/30/2014 8:53:06 AM2002donatfood1000
1/30/2014 8:53:06 AM2003cryspyfood5000
1/30/2014 8:53:06 AM5001coladrink3000
1/30/2014 8:53:06 AM5002pepsydrink3000
1/30/2014 8:53:06 AM5003isotonicdrink3000


how can I get the number of records based ITEM_TYPE 'Food' which item_code it begins with the number '2 'which then I gave the name' X '.
and also how can I get the number of records that his item_description 'Drink' and then I gave the name 'Y'


thanx all for your help..

This post has been answered by Frank Kulash on Jan 29 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 27 2014
Added on Jan 29 2014
5 comments
472 views