MySQL Forums
Forum List  »  Perl

Re: Please help me to find answer ASAP
Posted by: Randy Clamons
Date: July 02, 2007 11:57AM

Write a perl script that updates another table which holds a daily count of email addresses by their domain name.

Use this table to report the top 50 domains by count sorted by percentage growth of the last 30 days compared to the total.

Your main problem is that the mailing table has no timestamp and no primary key, so there is no way of knowing when addresses were added. This will make processing complicated and slow. You will need to run your counts and save the results daily. When you save the results, you need to include the date, domain and counts. As an alternative, consider adding a date column and an index on the date and domain.

At the start of your job, get the number of addresses you have already counted from the results table (SELECT SUM(count) as Count FROM results). Use that count in the LIMIT clause to select new address domains into a temporary table. Select the domain counts from the temporary table and insert them into your results table. Now you have the data for your report.

If you need more help, I'm available for Perl coding at $75 per hour.

Options: ReplyQuote


Subject
Written By
Posted
May 20, 2005 02:54AM
May 20, 2005 05:02AM
May 20, 2005 08:41AM
Re: Please help me to find answer ASAP
July 02, 2007 11:57AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.