SQL / PERL advice on running multiple queries?

jdr0317

New member
Okay, so I'm trying to come up w/ the correct statement for this, but unfortunately I am new to writing perl and could use some help.

So from a table, I am getting 4 columns (for the sake of not giving away company info, let's just call it Column A, Column B, Column C, and Column D). What I want to do is group by column A, and then make an alert if WordB appears in Column B for corresponding term in Column A over 2% of the time, if WordC appears less than 30% for Column A term, and if LIKE '%wordD1%' OR '%wordD2%' appears over 5% of the time for corresponding A.

An example could be this: If the word "football" is one of the terms in column A, then if kick appears 3 times in column B, flag, or if punt appears under 30% in Column C, flag, or if pass or throw appear over 5% of the time in Column D, flag. Could I do this all in one ensted if statement? Would I need multiple scripts for this?

Any help is appreciated.
 
Back
Top