#1 2007-07-10 10:34:19

S'Berry
Guest

component to get frequency

hi...

what component that i can use to get frequency in a table? and how to use this component?
Example

a b c
a b d
a b g

I want to know how  to get frequency if the table have a,b

thanks to help

#2 2007-07-10 10:50:34

plegall
Member
Registered: 2006-09-19
Posts: 1586
Website

Re: component to get frequency

Here is a "way" to do it.

My input file is:

Code:

[pierrick@plegall] ~/dev/tos/topics/topic1027
$ cat in.txt
a b c
a b d
a b g
d c a
d c b
e h i
e k l

My output is:

Code:

Starting job topic1027 at 10:46 10/07/2007.
.---------------------------.
|         tLogRow_1         |
+---------+---------+-------+
| column1 | column2 | count |
+---------+---------+-------+
| e       | k       |     1 |
| e       | h       |     1 |
| a       | b       |     3 |
| d       | c       |     2 |
'---------+---------+-------'
Job topic1027 ended at 10:46 10/07/2007. [exit code=0]

Uploaded Images

Offline

#3 2007-07-11 04:19:28

S'berry
Guest

Re: component to get frequency

I'm already try your solution but i got some problem. why the value of the other collom was lost?
i used mysql database. i want to store the result in table.
can u help me ?



thx n regrad

#4 2007-07-12 11:06:27

S'bery
Guest

Re: component to get frequency

wow... thanks for your suggestion.  I’ will try your suggestion.
thank you very much

Board footer

Powered by FluxBB