473,396 Members | 1,772 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Numbers of combinations for columns

Hello, I want to count numbers of combinations. For example, I have following data table in DB2:

ID col1 col2
1 AA aa
1 BB bb
1 CC cc
2 AA aa
2 BB ss
2 CC uu
3 AA aa
3 BB bb
4 AA aaa
4 BB bbb
5 AA aaa
5 BB bbb
5 CC uu

And expected output is:
col1 col2 #combination ID
aa bb 2 1 and 3
aa ss 1 2
aaa bbb 2 4 and 5

How can this be done?

Any help is very much appreciated.

Thank you much in advance!
Jul 26 '12 #1
1 1220
Rabbit
12,516 Expert Mod 8TB
I have no idea what you're trying to say.
Jul 26 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Dave Bazell | last post by:
I have a large array of numbers, say 10,000 rows by 8 columns. The numbers are mostly floating point but some integers. I want to align each column by the decimal point or right justify the...
4
by: William D. Bartholomew | last post by:
We need to store land title information about properties in various Australian states, but each state maintains it's own land title registry and use different columns (well actually different...
1
by: Don Sealer | last post by:
I have a report that reports from a query. The report lists numbers. The problem is there are over 100 numbers. The report shows this as one column of numbers over 4 pages. How can I get...
1
by: John Wilson | last post by:
I am still working away to get to grips with .NET web forms. Can anyone help me with these conundrums? How do I programmatically control the with of a datagrid itself and the columns in it? At...
16
by: a | last post by:
We are writing an app that assigns people to teams based on their curent score. Teams are 8 people, there are 2 teams. (i would like it to be flexible, but this is a start). I need an algorithm...
0
by: Louis Aslett | last post by:
I hope this is the correct newsgroup for this query (if not please give me a pointer to where is best): I understand the theory of normalisation etc and am trying to follow best practices in the...
9
by: serge | last post by:
/* Subject: How to build a procedure that returns different numbers of columns as a result based on a parameter. You can copy/paste this whole post in SQL Query Analyzer or Management Studio...
7
by: stealthmirage | last post by:
Hi users, i need to generate all possible combinations of number 1 and 2 with lenght 6 for example: 111111, 111112, 111121, 111211...............222221,222222 is there any way to do it ? ...
0
by: Bytes21 | last post by:
My file contains a series of numbers (integer, float, integer, float ....), each written on a separate line. The numbers of columns are different from one line to another i.e. 77 2.45 3 1.75 5 3.45...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.