Find the percentag in DB2.
Posted: Tue Dec 30, 2014 1:54 pm
Hello All,
I need to find out the percentage of a group of accessories in a given table. For example, let's assume ACCER is the main table and has got 100000 records. In this 30000 are with ACCCODE = 'STAPLE', if I know the numbers I will find out the percentage (30000/100000) x 100. But I don’t know the total number of records for both i.e. how many records are in table and how many are with STAPLE…
How can I do it in DB2 itself?
I need to find out the percentage of a group of accessories in a given table. For example, let's assume ACCER is the main table and has got 100000 records. In this 30000 are with ACCCODE = 'STAPLE', if I know the numbers I will find out the percentage (30000/100000) x 100. But I don’t know the total number of records for both i.e. how many records are in table and how many are with STAPLE…
How can I do it in DB2 itself?