editi has asked for the wisdom of the Perl Monks concerning the following question:
+-------+----------+-----------+-------------+----------+---------+--- +------+-----------+--------+----------+ | PdbId | MetalAtm | MetalName | MetalNumber | MetalChn | AtmName | Re +sName | ResNumber | ResChn | Distance | +-------+----------+-----------+-------------+----------+---------+--- +------+-----------+--------+----------+ | 1nc7 | MG | MG | 1501 | - | CL | CL | 1401 | - | 3.065 | | 1nc7 | MG | MG | 1501 | - | CL | CL | 1402 | - | 2.660 | | 1pex | CA | CA | 503 | - | CL | CL | 501 | - | 2.895 | | 1qhu | NA | NA | 3 | - | CL | CL | 1 | - | 3.096 | | 1qjs | NA | NA | 513 | A | CL | CL | 511 | A | 3.096 | | 1rtg | CA | CA | 2 | - | CL | CL | 1 | - | 3.079 | | 1xj6 | NA | NA | 5002 | - | CL | CL | 5001 | - | 2.628 | | 2caj | NI | NI | 1151 | B | CL | CL | 1150 | B | 3.551 | | 2oa9 | CD | CD | 911 | - | CL | CL | 800 | - | 2.291 | | 2oa9 | CD | CD | 913 | - | CL | CL | 801 | - | 2.403 | +-------+----------+-----------+-------------+----------+---------+--- +------+-----------+--------+----------+
I want to retrieve the rows only the count must have of single PdbId with RESNAME=CL should >=2 that means i want to retreive only
+-------+----------+-----------+-------------+----------+---------+--- +------+-----------+--------+----------+ | PdbId | MetalAtm | MetalName | MetalNumber | MetalChn | AtmName | Re +sName | ResNumber | ResChn | Distance | +-------+----------+-----------+-------------+----------+---------+--- +------+-----------+--------+----------+ | 1nc7 | MG | MG | 1501 | - | CL | CL | 1401 | - | 3.065 | | 1nc7 | MG | MG | 1501 | - | CL | CL | 1402 | - | 2.660 | | 2oa9 | CD | CD | 911 | - | CL | CL | 800 | - | 2.291 | | 2oa9 | CD | CD | 913 | - | CL | CL | 801 | - | 2.403 | +-------+----------+-----------+-------------+----------+---------+--- +------+-----------+--------+----------+
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (OT)Count the Column values if it same in the column
by moritz (Cardinal) on May 28, 2007 at 09:48 UTC | |
by Util (Priest) on May 29, 2007 at 14:51 UTC | |
|
Re: (OT)Count the Column values if it same in the column
by Util (Priest) on May 29, 2007 at 14:51 UTC |