{
  "id": 2712,
  "title": "Post-Mortem",
  "url": "/competitions/Raising-Money-to-Fund-an-Organizational-Mission/writeups/barrenwuffet-post-mortem",
  "author_name": "",
  "post_date": "2012-09-19T17:36:20.667Z",
  "votes": 4,
  "comment_count": 9,
  "views": 6054,
  "content": "<p>Anybody do or find anything interesting in this dataset? Or find any good tools for working with large data sets?</p>\r\n<p>I found it barely manageable given the size.&nbsp; It also took me awhile to wrap by head around what was in each of the files. Also the database restrictions (1 and 2 but not 3, 1 and 2 and 3, 2 and 3 but not 1, etc) made a really difficult task much harder\r\n and considerably less enjoyable.&nbsp; I ended up having to write 12 large files (and accompanying SQL code) for each model to compensate for this.\r\n</p>\r\n<p>I started out with a ~2% sample of the training data in R but even this was rough.&nbsp; I tried using the\r\n<em>ff</em> package without much luck.&nbsp; I ended up doing most of the data manipulation using SQL Server 2008 R2 Express and the SSMS which I found to be a bright spot in the whole process as it performed really well given the data size.&nbsp; I especially appreciated\r\n the data import manager which helps with wide data sets.</p>\r\n<p>My best model ended up just being prior averages for prospectid, zip5, and packageid with linear regression.&nbsp; I predicted donation amount (not amount2) and response rate using separate models.&nbsp; I'd then do predictedGift^1.15 * predictedResponseRate for a\r\n final prediction.</p>\r\n<p>I tried to use some of the demographic data but had a hard time as I was using zip5 as the key to get state abbreviations as a factor, but some of the zip codes cross state lines which leads to duplicates and zip9, even when indexed, just took too long.</p>\r\n<p>I think the contest was a cool idea but would have been much better on just one of the 3 databases.&nbsp; Without that restriction I would have had more time to explore the demographic and historical data.&nbsp; The one thing I would have really liked to explore is\r\n people's giving before the training period especially as much of the mailings seemed to be political and the test data is sitting within 12 months of a presidential election.\r\n</p>",
  "messages": [
    {
      "id": "14593",
      "postDate": "09/19/2012 17:36:20",
      "content": "<p>Anybody do or find anything interesting in this dataset? Or find any good tools for working with large data sets?</p>\r\n<p>I found it barely manageable given the size.&nbsp; It also took me awhile to wrap by head around what was in each of the files. Also the database restrictions (1 and 2 but not 3, 1 and 2 and 3, 2 and 3 but not 1, etc) made a really difficult task much harder\r\n and considerably less enjoyable.&nbsp; I ended up having to write 12 large files (and accompanying SQL code) for each model to compensate for this.\r\n</p>\r\n<p>I started out with a ~2% sample of the training data in R but even this was rough.&nbsp; I tried using the\r\n<em>ff</em> package without much luck.&nbsp; I ended up doing most of the data manipulation using SQL Server 2008 R2 Express and the SSMS which I found to be a bright spot in the whole process as it performed really well given the data size.&nbsp; I especially appreciated\r\n the data import manager which helps with wide data sets.</p>\r\n<p>My best model ended up just being prior averages for prospectid, zip5, and packageid with linear regression.&nbsp; I predicted donation amount (not amount2) and response rate using separate models.&nbsp; I'd then do predictedGift^1.15 * predictedResponseRate for a\r\n final prediction.</p>\r\n<p>I tried to use some of the demographic data but had a hard time as I was using zip5 as the key to get state abbreviations as a factor, but some of the zip codes cross state lines which leads to duplicates and zip9, even when indexed, just took too long.</p>\r\n<p>I think the contest was a cool idea but would have been much better on just one of the 3 databases.&nbsp; Without that restriction I would have had more time to explore the demographic and historical data.&nbsp; The one thing I would have really liked to explore is\r\n people's giving before the training period especially as much of the mailings seemed to be political and the test data is sitting within 12 months of a presidential election.\r\n</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "14607",
      "postDate": "09/19/2012 22:39:52",
      "content": "<p>The size of the data did make it more difficult to work with. In the end, my best model was very simple. It was essentially the same as the benchmark, except averages were taken over (zip, MajorVector) instead of just zip, and all of the data were used,\r\n rather than a sample.</p>\r\n<p>I got started with this competition late, but if I had given myself more time to spend on this, or if the data had been more manageable in size, I would have liked to look into the mailing history data. It'd be great to see if anyone else found anything\r\n interesting in this part of the data.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "14621",
      "postDate": "09/20/2012 04:04:40",
      "content": "<p>I used Revolution R which allowed me to create xdf files (virtual memory dumps on my SSD drive). xdf made it possible to run multiple possion regression, tweedie regression, glm, linear regression models to predict amount2 fairly quickly. (glm on the entire\r\n training set ran in ~30s on my laptop with quad core, 8gb ram and ssd). I guess I made the mistake of focusing on creating fancy models to predict amount2 directly instead of&nbsp;going for predictedGift^1.15 * predictedResponseRate. Anyway, xdf files are pretty\r\n neat and since Revolution R is free for kaggle compeittiors, you can try it out in future compeititons:</p>\r\n<p>http://blog.revolutionanalytics.com/2011/03/analyzing-big-data-with-revolution-r-enterprise.html</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "14638",
      "postDate": "09/20/2012 17:22:27",
      "content": "<p>The dataset size did prevent some methods from being feasible. I started out with R, but ran into memory issues fast. I then decided to create a DB, and write some custom code around it. I found this to be much slower than just using bash and utils to manipulate\r\n the files directly. So ultimately I created something like weighted naive bayes model that only had to read the data line-by-line and a bunch of hash maps to store the counts. Looking at the past performance of the prospects turned out to be the most effective\r\n way I found to predict their future donations. This was even improved when I considered the donations they made to a specific Vector Minor.\r\n</p>\r\n<p>A few things I thought / had questions about:</p>\r\n<p>1)<br>\r\nThe competition is presented as a regression problem, the description talks about &quot;predicting amount2&quot;. However, it’s necessarily one. The evaluation metric only required us to determine the subset of mailings that were most likely to yield a donation. To find\r\n this subset, I think you could approach this as a ranking problem. But since how the likely mailings ranked against each other didn’t matter, I opted to avoid trying to figure out how to implement a ranking algorithm. I'd be interested to hear if anyone did,\r\n and how that turned out. <br>\r\nInstead, I decided to approach the competition as a classification problem with some specific considerations around the operating characteristics of the classifier. The true positive rate (i.e., the number of mailings that actually yielded donations) was much\r\n lower than the true negative rate. So I though you could view the problem as asking for a classifier that has a true positive rate that is as high as possible (they said it would max out at 87% of the top 75%), with an allowable false positive rate of something\r\n like 13%. If you did this, you would assign a non-zero donation to each instance in the top 75%, plus some false positives which would not adversely impact your score. You’d than have a zero donation value to each instance that is a true negative. This worked\r\n ok, but clearly there are some better approaches out there.</p>\r\n<p>2)<br>\r\nWhat's the deal with amount2 vs amount? I understand that raising the amount to 1.15 would emphasize the value of larger donations over smaller ones, but how does that impact the ranking? x^1.15 for x &gt;= 0 is monotonically increasing. As a result, I don't understand\r\n why you would not get the same results looking only at amount. I’m probably missing something, can anyone explain this?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "14642",
      "postDate": "09/20/2012 19:52:02",
      "content": "<p>I've used MySQL extensively, wrote a few custom functions to capture behavioral &amp; temporal data @ prospect, zip, listid, phase-packageid level in ~300 variables and then took a 10% sample of the training dataset provided and put it through random forest(3000\r\n trees, no tuning done, treating as a regression problem). I've applied PCA on the demographic dataset provied (~35 PCs captured 95% of the variation) &amp; appended it to my dataset.</p>\r\n<p>I've got ideas for this competition very late (~10days to go). I felt I've done a great deal of work but could not come up with a model which could take advantage of the rich dataset I've put together.</p>\r\n<p>If only I teamed up with someone better at algorithms, whilst I took care of the data manipulation &amp; variable creation. Well, it is over now.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "14674",
      "postDate": "09/21/2012 19:20:09",
      "content": "<p>Below is my custom function, which retrieves a prospects donation history. the parameter MyIntervalMonths allows you to answer questions such, how did this prospect donate in the last 1,3,6 &amp; 9 months. What sort of mail does he/she recieve, how many organisation\r\n have targeted him, how is the donation distributed amongst the various vectors etc...</p>\r\n<p>&nbsp;</p>\r\n<p>Notice also that it takes databaseid as a parameter. This is to conform with the rule that we cannot use data about a propect from databaseid 3 in 1 and vice versa. Also note that history is offset by 30 days from datemailed.</p>\r\n<p>&nbsp;</p>\r\n<p>This is done keeping in mind how the model if implemented would work in practice. For example after posting a mail to a prospect it could take anywhere between 2-4 weeks to know whether he donated or not. this is where my earlier post about http://www.kaggle.com/c/Raising-Money-to-Fund-an-Organizational-Mission/forums/t/2570/how-soon-after-mailing-do-you-know-the-results\r\n comes into picture.</p>\r\n<p>This udf returns a vector delimited by hash (#) and use a view to un-serialise it.</p>\r\n<p>&nbsp;</p>\r\n<p>Similar udfs were defined for zip, listid, packageid (including a variable which counts the number of times prospect has seen this package before), phase-listid &amp; phase-packageid combo.</p>\r\n<p>[code]</p>\r\n<p>drop function DONATIONS.PROSPECTHISTORY;<br>\r\nDELIMITER //<br>\r\nCREATE FUNCTION ProspectHistory(InputProspectID int, <br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CurrentDatemailed datetime, <br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;InputPackageID int,<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InputDatabaseID int,<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MyIntervalMonths int<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br>\r\n&nbsp; RETURNS varchar(240)<br>\r\n&nbsp; BEGIN<br>\r\n&nbsp;&nbsp;&nbsp; DECLARE RESULT varchar(240) ;<br>\r\n&nbsp;&nbsp;&nbsp; if InputDatabaseID=1 then<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SET RESULT = (select&nbsp;&nbsp; &nbsp;<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;concat_ws('#',<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;COALESCE(SUM(TOTALNUMOFMAILSRECEIVED),0) -- TotalNumOfMailsReceived 6bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(sum(sum_donated),0) -- TotalNumOfDonationsMade 6bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(Round(sum(sum_donated)/SUM(TOTALNUMOFMAILSRECEIVED), 4),0) -- ResponseRate 6bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(Round(sum(total_amt_donated)/SUM(TOTALNUMOFMAILSRECEIVED),2),0) -- AvgAmountDonated 8bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMajOR='NONPROFIT', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for nonprofit<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='Congress', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for Congress<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='PAC', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for PAC<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='Senate', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for Senate<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='State', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for State<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='CNP', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for CNP<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='DEF', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for DEF<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='IMM', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for IMM<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='MEM', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for MEM<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='MIL', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for MIL<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='POLICY', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for POLICY<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='REL', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for REL<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='TAX', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for TAX<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(COUNT(distinct LISTID),0) -- NO_OF_ORGS_TARGTED_by 6bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(sum(if (PACKAGEID=InputPackageID, TOTALNUMOFMAILSRECEIVED, 0)),0) -- no. of times seen this package before 3 bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMAJOR='NONPROFIT' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_of NONPROFIT<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='Congress' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofCongress<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='PAC' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofPAC<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='Senate' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofSenate<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='State' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofState<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='CNP' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofCNP<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='DEF' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofDEF<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='IMM' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofIMM<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='MEM' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofMEM<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='MIL' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofMIL<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='POLICY' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofPOLICY<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='REL' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofREL<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='TAX' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofTAX<br>\r\n<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;)<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from&nbsp;&nbsp; &nbsp;PROSPECTSSUMMARY<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; where&nbsp;&nbsp; &nbsp;prospectid = InputProspectID and <br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MONTHmailed BETWEEN (CurrentDatemailed - INTERVAL MyIntervalMonths&#43;1 MONTH) and (CurrentDatemailed - INTERVAL 1 MONTH)<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AND DATABASEID IN(1,2));<br>\r\n&nbsp;&nbsp;&nbsp; elseif InputDatabaseID=2 then <br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SET RESULT = (select&nbsp;&nbsp; &nbsp;<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;concat_ws('#',<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;COALESCE(SUM(TOTALNUMOFMAILSRECEIVED),0) -- TotalNumOfMailsReceived 6bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(sum(sum_donated),0) -- TotalNumOfDonationsMade 6bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(Round(sum(sum_donated)/SUM(TOTALNUMOFMAILSRECEIVED), 4),0) -- ResponseRate 6bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(Round(sum(total_amt_donated)/SUM(TOTALNUMOFMAILSRECEIVED),2),0) -- AvgAmountDonated 8bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMajOR='NONPROFIT', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for nonprofit<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='Congress', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for Congress<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='PAC', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for PAC<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='Senate', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for Senate<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='State', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for State<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='CNP', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for CNP<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='DEF', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for DEF<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='IMM', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for IMM<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='MEM', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for MEM<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='MIL', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for MIL<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='POLICY', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for POLICY<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='REL', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for REL<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='TAX', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for TAX<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(COUNT(distinct LISTID),0) -- NO_OF_ORGS_TARGTED_by 6bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(sum(if (PACKAGEID=InputPackageID, TOTALNUMOFMAILSRECEIVED, 0)),0) -- no. of times seen this package before 3 bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMAJOR='NONPROFIT' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_of NONPROFIT<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='Congress' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofCongress<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='PAC' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofPAC<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='Senate' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofSenate<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='State' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofState<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='CNP' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofCNP<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='DEF' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofDEF<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='IMM' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofIMM<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='MEM' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofMEM<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='MIL' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofMIL<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='POLICY' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofPOLICY<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='REL' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofREL<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='TAX' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofTAX<br>\r\n<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;)<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from&nbsp;&nbsp; &nbsp;PROSPECTSSUMMARY<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; where&nbsp;&nbsp; &nbsp;prospectid = InputProspectID and <br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;MONTHmailed BETWEEN (CurrentDatemailed - INTERVAL MyIntervalMonths&#43;1 MONTH) and (CurrentDatemailed - INTERVAL 1 MONTH));<br>\r\n&nbsp;&nbsp;&nbsp; elseif InputDatabaseID=3 then&nbsp;&nbsp; &nbsp;<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SET RESULT = (select&nbsp;&nbsp; &nbsp;<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;concat_ws('#',<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;COALESCE(SUM(TOTALNUMOFMAILSRECEIVED),0) -- TotalNumOfMailsReceived 6bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(sum(sum_donated),0) -- TotalNumOfDonationsMade 6bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(Round(sum(sum_donated)/SUM(TOTALNUMOFMAILSRECEIVED), 4),0) -- ResponseRate 6bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(Round(sum(total_amt_donated)/SUM(TOTALNUMOFMAILSRECEIVED),2),0) -- AvgAmountDonated 8bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMajOR='NONPROFIT', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for nonprofit<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='Congress', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for Congress<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='PAC', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for PAC<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='Senate', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for Senate<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='State', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for State<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='CNP', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for CNP<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='DEF', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for DEF<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='IMM', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for IMM<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='MEM', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for MEM<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='MIL', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for MIL<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='POLICY', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for POLICY<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='REL', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for REL<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='TAX', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for TAX<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(COUNT(distinct LISTID),0) -- NO_OF_ORGS_TARGTED_by 6bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(sum(if (PACKAGEID=InputPackageID, TOTALNUMOFMAILSRECEIVED, 0)),0) -- no. of times seen this package before 3 bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMAJOR='NONPROFIT' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_of NONPROFIT<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='Congress' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofCongress<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='PAC' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofPAC<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='Senate' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofSenate<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='State' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofState<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='CNP' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofCNP<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='DEF' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofDEF<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='IMM' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofIMM<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='MEM' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofMEM<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='MIL' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofMIL<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='POLICY' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofPOLICY<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='REL' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofREL<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='TAX' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofTAX<br>\r\n<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;)<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from&nbsp;&nbsp; &nbsp;PROSPECTSSUMMARY<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; where&nbsp;&nbsp; &nbsp;prospectid = InputProspectID and <br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;MONTHmailed BETWEEN (CurrentDatemailed - INTERVAL MyIntervalMonths&#43;1 MONTH) and (CurrentDatemailed - INTERVAL 1 MONTH)<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AND DATABASEID IN(2,3));<br>\r\n&nbsp;&nbsp;&nbsp; else <br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SET RESULT = (select&nbsp;&nbsp; &nbsp;<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;concat_ws('#',<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;COALESCE(SUM(TOTALNUMOFMAILSRECEIVED),0) -- TotalNumOfMailsReceived 6bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(sum(sum_donated),0) -- TotalNumOfDonationsMade 6bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(Round(sum(sum_donated)/SUM(TOTALNUMOFMAILSRECEIVED), 4),0) -- ResponseRate 6bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(Round(sum(total_amt_donated)/SUM(TOTALNUMOFMAILSRECEIVED),2),0) -- AvgAmountDonated 8bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMajOR='NONPROFIT', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for nonprofit<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='Congress', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for Congress<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='PAC', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for PAC<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='Senate', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for Senate<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='State', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for State<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='CNP', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for CNP<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='DEF', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for DEF<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='IMM', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for IMM<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='MEM', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for MEM<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='MIL', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for MIL<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='POLICY', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for POLICY<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='REL', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for REL<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='TAX', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for TAX<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(COUNT(distinct LISTID),0) -- NO_OF_ORGS_TARGTED_by 6bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(sum(if (PACKAGEID=InputPackageID, TOTALNUMOFMAILSRECEIVED, 0)),0) -- no. of times seen this package before 3 bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMAJOR='NONPROFIT' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_of NONPROFIT<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='Congress' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofCongress<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='PAC' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofPAC<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='Senate' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofSenate<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='State' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofState<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='CNP' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofCNP<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='DEF' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofDEF<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='IMM' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofIMM<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='MEM' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofMEM<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='MIL' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofMIL<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='POLICY' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofPOLICY<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='REL' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofREL<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='TAX' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofTAX<br>\r\n<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;)<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from&nbsp;&nbsp; &nbsp;PROSPECTSSUMMARY<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; where&nbsp;&nbsp; &nbsp;prospectid = InputProspectID and <br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;MONTHmailed BETWEEN (CurrentDatemailed - INTERVAL MyIntervalMonths&#43;1 MONTH) and (CurrentDatemailed - INTERVAL 1 MONTH)<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AND DATABASEID =InputDatabaseID);<br>\r\n&nbsp;&nbsp;&nbsp; END IF;<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RETURN result;<br>\r\n&nbsp;&nbsp;&nbsp; END<br>\r\n&nbsp;&nbsp;&nbsp; //<br>\r\n&nbsp; DELIMITER ; <br>\r\n&nbsp;</p>\r\n<p>[/code]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "14677",
      "postDate": "09/21/2012 19:36:13",
      "content": "<p>And these are the variables I've created.</p>\r\n<p>Comp1-comp37 are the prinicpal components extracted from the demographic dataset provided. These 37 PCs capture ~95% of the variation.</p>\r\n<p>Those prefixed with</p>\r\n<p>PR: prospect related variables</p>\r\n<p>ZP: zip level variables</p>\r\n<p>LS: listid level variables</p>\r\n<p>PKPH: Packageid - phase level variables</p>\r\n<p>LSPH: listid - phase level variables.</p>\r\n<p>Suffixed:</p>\r\n<p>L1M: last 1month</p>\r\n<p>L3M: last 3months and so on for L6M &amp; L9M.</p>\r\n<p>Using whatever I knew about working on MySQL, all my udf's were tuned for performance (used a lot of indexes&nbsp; - somemay say it was a bit of an overkill).</p>\r\n<p>I found that when I was creating my training dataset it was taking an awful amount of time. So I parallelised my queries the &quot;poor man's&quot; way. Basically I've opened 8 connections to my database and each connection was working on creating these variables\r\n on only 1million rows each. This reduced the amount of time required to prepare my training dataset dramatically. It took about 5hours. I&nbsp; estimated it would take a good few days if I left it to run on just 1 connection.</p>\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"width:861px\">\r\n<colgroup><col span=\"2\" width=\"258\"><col width=\"345\"></colgroup>\r\n<tbody>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">ROW_ID</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofMIL_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_PAC_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">AMOUNT2</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofPOLICY_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_Senate_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_1</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofREL_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_State_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_2</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofTAX_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_CNP_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_3</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_TotalNumOfMailsReceived_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_DEF_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_4</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_TotalNumOfDonationsMade_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_IMM_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_5</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_ResponseRate_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_MEM_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_6</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_AvgAmountDonated_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_MIL_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_7</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_nonprofit_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_POLICY_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_8</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_Congress_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_REL_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_9</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_PAC_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_TAX_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_10</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_Senate_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_of_NONPROFIT_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_11</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_State_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofCongress_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_12</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_CNP_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofPAC_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_13</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_DEF_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofSenate_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_14</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_IMM_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofState_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_15</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_MEM_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofCNP_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_16</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_MIL_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofDEF_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_17</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_POLICY_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofIMM_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_18</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_REL_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofMEM_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_19</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_TAX_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofMIL_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_20</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_NO_OF_ORGS_TARGTED_by_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofPOLICY_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_21</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_No_of_times_package_seen_b4_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofREL_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_22</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_of_NONPROFIT_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofTAX_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_23</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofCongress_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_ResponseRate_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_24</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofPAC_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_AvgAmountDonated_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_25</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofSenate_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_nonprofit_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_26</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofState_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_Congress_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_27</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofCNP_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_PAC_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_28</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofDEF_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_Senate_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_29</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofIMM_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_State_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_30</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofMEM_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_CNP_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_31</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofMIL_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_DEF_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_32</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofPOLICY_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_IMM_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_33</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofREL_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_MEM_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_34</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofTAX_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_MIL_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_35</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_TotalNumOfMailsReceived_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_POLICY_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_36</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_TotalNumOfDonationsMade_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_REL_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_37</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_ResponseRate_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_TAX_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMPS_IMPUTED</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_AvgAmountDonated_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_of_NONPROFIT_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_TotalNumOfMailsReceived_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_nonprofit_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofCongress_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_TotalNumOfDonationsMade_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_Congress_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofPAC_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_ResponseRate_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_PAC_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofSenate_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_AvgAmountDonated_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_Senate_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofState_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_nonprofit_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_State_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofCNP_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_Congress_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_CNP_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofDEF_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_PAC_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_DEF_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofIMM_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_Senate_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_IMM_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofMEM_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_State_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_MEM_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofMIL_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_CNP_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_MIL_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofPOLICY_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_DEF_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_POLICY_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofREL_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_IMM_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_REL_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofTAX_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_MEM_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_TAX_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_ResponseRate_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_MIL_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_NO_OF_ORGS_TARGTED_by_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_AvgAmountDonated_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_POLICY_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_No_of_times_package_seen_b4_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_nonprofit_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_REL_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_of_NONPROFIT_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_Congress_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_TAX_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofCongress_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_PAC_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_NO_OF_ORGS_TARGTED_by_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofPAC_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_Senate_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_No_of_times_package_seen_b4_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofSenate_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_State_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_of_NONPROFIT_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofState_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_CNP_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofCongress_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofCNP_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_DEF_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofPAC_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofDEF_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_IMM_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofSenate_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofIMM_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_MEM_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofState_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofMEM_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_MIL_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofCNP_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofMIL_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_POLICY_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofDEF_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofPOLICY_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_REL_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofIMM_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofREL_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_TAX_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofMEM_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofTAX_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_of_NONPROFIT_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofMIL_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_ResponseRate_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofCongress_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofPOLICY_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_AvgAmountDonated_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofPAC_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofREL_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_share_of_mail_for_nonprofit_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofSenate_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofTAX_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_share_of_mail_for_Congress_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofState_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_TotalNumOfMailsReceived_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_share_of_mail_for_PAC_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofCNP_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_TotalNumOfDonationsMade_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_share_of_mail_for_Senate_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofDEF_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_ResponseRate_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_share_of_mail_for_State_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofIMM_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_AvgAmountDonated_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_share_of_mail_for_CNP_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofMEM_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_nonprofit_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_share_of_mail_for_DEF_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofMIL_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_Congress_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_share_of_mail_for_IMM_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofPOLICY_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_PAC_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_share_of_mail_for_MEM_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofREL_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_Senate_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_share_of_mail_for_MIL_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofTAX_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_State_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_share_of_mail_for_POLICY_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">LS_ResponseRate_L1M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_CNP_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_share_of_mail_for_REL_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">LS_AvgAmountDonated_L1M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_DEF_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_share_of_mail_for_TAX_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">LS_ResponseRate_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_IMM_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_donation_share_of_NONPROFIT_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">LS_AvgAmountDonated_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_MEM_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_donation_share_ofCongress_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">LS_ResponseRate_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_MIL_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_donation_share_ofPAC_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">LS_AvgAmountDonated_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_POLICY_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_donation_share_ofSenate_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">LS_ResponseRate_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_REL_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_donation_share_ofState_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">LS_AvgAmountDonated_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_TAX_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_donation_share_ofCNP_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">PKPH_ResponseRate_L1M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_NO_OF_ORGS_TARGTED_by_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_donation_share_ofDEF_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">PKPH_AvgAmountDonated_L1M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_No_of_times_package_seen_b4_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_donation_share_ofIMM_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">PKPH_ResponseRate_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_of_NONPROFIT_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_donation_share_ofMEM_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">PKPH_AvgAmountDonated_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofCongress_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_donation_share_ofMIL_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">PKPH_ResponseRate_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofPAC_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_donation_share_ofPOLICY_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">PKPH_AvgAmountDonated_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofSenate_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_donation_share_ofREL_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">PKPH_ResponseRate_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofState_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_donation_share_ofTAX_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">PKPH_AvgAmountDonated_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofCNP_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_ResponseRate_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">LSPH_ResponseRate_L1M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofDEF_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_AvgAmountDonated_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">LSPH_AvgAmountDonated_L1M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofIMM_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_share_of_mail_for_nonprofit_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">LSPH_ResponseRate_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofMEM_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_share_of_mail_for_Congress_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">LSPH_AvgAmountDonated_L3M</td>\r\n</tr>\r\n<tr>\r\n<td height=\"19\">&nbsp;</td>\r\n<td>&nbsp;</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">LSPH_ResponseRate_L6M</td>\r\n</tr>\r\n<tr>\r\n<td height=\"19\">&nbsp;</td>\r\n<td>&nbsp;</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">LSPH_AvgAmountDonated_L6M</td>\r\n</tr>\r\n<tr>\r\n<td height=\"19\">&nbsp;</td>\r\n<td>&nbsp;</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">LSPH_ResponseRate_L9M</td>\r\n</tr>\r\n<tr>\r\n<td height=\"19\">&nbsp;</td>\r\n<td>&nbsp;</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">LSPH_AvgAmountDonated_L9M</td>\r\n</tr>\r\n</tbody>\r\n</table>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "14679",
      "postDate": "09/21/2012 19:48:48",
      "content": "<p>If the competition organiser is cool with my posting my training &amp; test dataset (total 5GB .rar files) with the above mentioned variables for anyone to have a stab at with their technique , I'm happy to do so, hopefully they can derive better predictive\r\n performance than I could.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "14756",
      "postDate": "09/24/2012 19:05:15",
      "content": "<p>That is absolutely fine with us - I don't know if anyone is dying to continue to try working on it now that the competition is over, but we are certainly open to more ideas and improvements, to the extent that there are competitors out there interested in\r\n continuing. Thanks!</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "14769",
      "postDate": "09/25/2012 04:12:08",
      "content": "<p>I've been looking at the demographic data and have a question about how it's organized particularly around the STOTPOP or total population.&nbsp; If I take all of the rows with a given city name and sum the STOTPOP columns, the resulting sum is a multiple of\r\n what the actual population is (according to wikipedia).&nbsp; I was wondering if you could tell me how the data is organized as it doesn't appear to be by zip / zip9 / city.&nbsp; In other words if I wanted to find out the population of a given city, how would I do\r\n so?</p>",
      "rawMarkdown": "",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 14607,
      "author_name": "killianoconnor",
      "author_url": "",
      "post_date": "09/19/2012 22:39:52",
      "content": "<p>The size of the data did make it more difficult to work with. In the end, my best model was very simple. It was essentially the same as the benchmark, except averages were taken over (zip, MajorVector) instead of just zip, and all of the data were used,\r\n rather than a sample.</p>\r\n<p>I got started with this competition late, but if I had given myself more time to spend on this, or if the data had been more manageable in size, I would have liked to look into the mailing history data. It'd be great to see if anyone else found anything\r\n interesting in this part of the data.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 14621,
      "author_name": "thiakx",
      "author_url": "",
      "post_date": "09/20/2012 04:04:40",
      "content": "<p>I used Revolution R which allowed me to create xdf files (virtual memory dumps on my SSD drive). xdf made it possible to run multiple possion regression, tweedie regression, glm, linear regression models to predict amount2 fairly quickly. (glm on the entire\r\n training set ran in ~30s on my laptop with quad core, 8gb ram and ssd). I guess I made the mistake of focusing on creating fancy models to predict amount2 directly instead of&nbsp;going for predictedGift^1.15 * predictedResponseRate. Anyway, xdf files are pretty\r\n neat and since Revolution R is free for kaggle compeittiors, you can try it out in future compeititons:</p>\r\n<p>http://blog.revolutionanalytics.com/2011/03/analyzing-big-data-with-revolution-r-enterprise.html</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 14638,
      "author_name": "gilinson",
      "author_url": "",
      "post_date": "09/20/2012 17:22:27",
      "content": "<p>The dataset size did prevent some methods from being feasible. I started out with R, but ran into memory issues fast. I then decided to create a DB, and write some custom code around it. I found this to be much slower than just using bash and utils to manipulate\r\n the files directly. So ultimately I created something like weighted naive bayes model that only had to read the data line-by-line and a bunch of hash maps to store the counts. Looking at the past performance of the prospects turned out to be the most effective\r\n way I found to predict their future donations. This was even improved when I considered the donations they made to a specific Vector Minor.\r\n</p>\r\n<p>A few things I thought / had questions about:</p>\r\n<p>1)<br>\r\nThe competition is presented as a regression problem, the description talks about &quot;predicting amount2&quot;. However, it’s necessarily one. The evaluation metric only required us to determine the subset of mailings that were most likely to yield a donation. To find\r\n this subset, I think you could approach this as a ranking problem. But since how the likely mailings ranked against each other didn’t matter, I opted to avoid trying to figure out how to implement a ranking algorithm. I'd be interested to hear if anyone did,\r\n and how that turned out. <br>\r\nInstead, I decided to approach the competition as a classification problem with some specific considerations around the operating characteristics of the classifier. The true positive rate (i.e., the number of mailings that actually yielded donations) was much\r\n lower than the true negative rate. So I though you could view the problem as asking for a classifier that has a true positive rate that is as high as possible (they said it would max out at 87% of the top 75%), with an allowable false positive rate of something\r\n like 13%. If you did this, you would assign a non-zero donation to each instance in the top 75%, plus some false positives which would not adversely impact your score. You’d than have a zero donation value to each instance that is a true negative. This worked\r\n ok, but clearly there are some better approaches out there.</p>\r\n<p>2)<br>\r\nWhat's the deal with amount2 vs amount? I understand that raising the amount to 1.15 would emphasize the value of larger donations over smaller ones, but how does that impact the ranking? x^1.15 for x &gt;= 0 is monotonically increasing. As a result, I don't understand\r\n why you would not get the same results looking only at amount. I’m probably missing something, can anyone explain this?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 14642,
      "author_name": "sashikanthdareddy",
      "author_url": "",
      "post_date": "09/20/2012 19:52:02",
      "content": "<p>I've used MySQL extensively, wrote a few custom functions to capture behavioral &amp; temporal data @ prospect, zip, listid, phase-packageid level in ~300 variables and then took a 10% sample of the training dataset provided and put it through random forest(3000\r\n trees, no tuning done, treating as a regression problem). I've applied PCA on the demographic dataset provied (~35 PCs captured 95% of the variation) &amp; appended it to my dataset.</p>\r\n<p>I've got ideas for this competition very late (~10days to go). I felt I've done a great deal of work but could not come up with a model which could take advantage of the rich dataset I've put together.</p>\r\n<p>If only I teamed up with someone better at algorithms, whilst I took care of the data manipulation &amp; variable creation. Well, it is over now.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 14674,
      "author_name": "sashikanthdareddy",
      "author_url": "",
      "post_date": "09/21/2012 19:20:09",
      "content": "<p>Below is my custom function, which retrieves a prospects donation history. the parameter MyIntervalMonths allows you to answer questions such, how did this prospect donate in the last 1,3,6 &amp; 9 months. What sort of mail does he/she recieve, how many organisation\r\n have targeted him, how is the donation distributed amongst the various vectors etc...</p>\r\n<p>&nbsp;</p>\r\n<p>Notice also that it takes databaseid as a parameter. This is to conform with the rule that we cannot use data about a propect from databaseid 3 in 1 and vice versa. Also note that history is offset by 30 days from datemailed.</p>\r\n<p>&nbsp;</p>\r\n<p>This is done keeping in mind how the model if implemented would work in practice. For example after posting a mail to a prospect it could take anywhere between 2-4 weeks to know whether he donated or not. this is where my earlier post about http://www.kaggle.com/c/Raising-Money-to-Fund-an-Organizational-Mission/forums/t/2570/how-soon-after-mailing-do-you-know-the-results\r\n comes into picture.</p>\r\n<p>This udf returns a vector delimited by hash (#) and use a view to un-serialise it.</p>\r\n<p>&nbsp;</p>\r\n<p>Similar udfs were defined for zip, listid, packageid (including a variable which counts the number of times prospect has seen this package before), phase-listid &amp; phase-packageid combo.</p>\r\n<p>[code]</p>\r\n<p>drop function DONATIONS.PROSPECTHISTORY;<br>\r\nDELIMITER //<br>\r\nCREATE FUNCTION ProspectHistory(InputProspectID int, <br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CurrentDatemailed datetime, <br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;InputPackageID int,<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InputDatabaseID int,<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MyIntervalMonths int<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br>\r\n&nbsp; RETURNS varchar(240)<br>\r\n&nbsp; BEGIN<br>\r\n&nbsp;&nbsp;&nbsp; DECLARE RESULT varchar(240) ;<br>\r\n&nbsp;&nbsp;&nbsp; if InputDatabaseID=1 then<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SET RESULT = (select&nbsp;&nbsp; &nbsp;<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;concat_ws('#',<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;COALESCE(SUM(TOTALNUMOFMAILSRECEIVED),0) -- TotalNumOfMailsReceived 6bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(sum(sum_donated),0) -- TotalNumOfDonationsMade 6bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(Round(sum(sum_donated)/SUM(TOTALNUMOFMAILSRECEIVED), 4),0) -- ResponseRate 6bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(Round(sum(total_amt_donated)/SUM(TOTALNUMOFMAILSRECEIVED),2),0) -- AvgAmountDonated 8bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMajOR='NONPROFIT', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for nonprofit<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='Congress', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for Congress<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='PAC', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for PAC<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='Senate', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for Senate<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='State', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for State<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='CNP', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for CNP<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='DEF', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for DEF<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='IMM', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for IMM<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='MEM', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for MEM<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='MIL', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for MIL<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='POLICY', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for POLICY<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='REL', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for REL<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='TAX', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for TAX<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(COUNT(distinct LISTID),0) -- NO_OF_ORGS_TARGTED_by 6bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(sum(if (PACKAGEID=InputPackageID, TOTALNUMOFMAILSRECEIVED, 0)),0) -- no. of times seen this package before 3 bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMAJOR='NONPROFIT' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_of NONPROFIT<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='Congress' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofCongress<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='PAC' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofPAC<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='Senate' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofSenate<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='State' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofState<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='CNP' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofCNP<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='DEF' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofDEF<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='IMM' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofIMM<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='MEM' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofMEM<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='MIL' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofMIL<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='POLICY' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofPOLICY<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='REL' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofREL<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='TAX' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofTAX<br>\r\n<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;)<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from&nbsp;&nbsp; &nbsp;PROSPECTSSUMMARY<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; where&nbsp;&nbsp; &nbsp;prospectid = InputProspectID and <br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MONTHmailed BETWEEN (CurrentDatemailed - INTERVAL MyIntervalMonths&#43;1 MONTH) and (CurrentDatemailed - INTERVAL 1 MONTH)<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AND DATABASEID IN(1,2));<br>\r\n&nbsp;&nbsp;&nbsp; elseif InputDatabaseID=2 then <br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SET RESULT = (select&nbsp;&nbsp; &nbsp;<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;concat_ws('#',<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;COALESCE(SUM(TOTALNUMOFMAILSRECEIVED),0) -- TotalNumOfMailsReceived 6bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(sum(sum_donated),0) -- TotalNumOfDonationsMade 6bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(Round(sum(sum_donated)/SUM(TOTALNUMOFMAILSRECEIVED), 4),0) -- ResponseRate 6bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(Round(sum(total_amt_donated)/SUM(TOTALNUMOFMAILSRECEIVED),2),0) -- AvgAmountDonated 8bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMajOR='NONPROFIT', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for nonprofit<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='Congress', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for Congress<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='PAC', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for PAC<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='Senate', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for Senate<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='State', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for State<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='CNP', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for CNP<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='DEF', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for DEF<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='IMM', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for IMM<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='MEM', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for MEM<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='MIL', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for MIL<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='POLICY', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for POLICY<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='REL', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for REL<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='TAX', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for TAX<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(COUNT(distinct LISTID),0) -- NO_OF_ORGS_TARGTED_by 6bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(sum(if (PACKAGEID=InputPackageID, TOTALNUMOFMAILSRECEIVED, 0)),0) -- no. of times seen this package before 3 bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMAJOR='NONPROFIT' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_of NONPROFIT<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='Congress' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofCongress<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='PAC' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofPAC<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='Senate' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofSenate<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='State' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofState<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='CNP' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofCNP<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='DEF' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofDEF<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='IMM' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofIMM<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='MEM' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofMEM<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='MIL' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofMIL<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='POLICY' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofPOLICY<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='REL' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofREL<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='TAX' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofTAX<br>\r\n<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;)<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from&nbsp;&nbsp; &nbsp;PROSPECTSSUMMARY<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; where&nbsp;&nbsp; &nbsp;prospectid = InputProspectID and <br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;MONTHmailed BETWEEN (CurrentDatemailed - INTERVAL MyIntervalMonths&#43;1 MONTH) and (CurrentDatemailed - INTERVAL 1 MONTH));<br>\r\n&nbsp;&nbsp;&nbsp; elseif InputDatabaseID=3 then&nbsp;&nbsp; &nbsp;<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SET RESULT = (select&nbsp;&nbsp; &nbsp;<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;concat_ws('#',<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;COALESCE(SUM(TOTALNUMOFMAILSRECEIVED),0) -- TotalNumOfMailsReceived 6bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(sum(sum_donated),0) -- TotalNumOfDonationsMade 6bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(Round(sum(sum_donated)/SUM(TOTALNUMOFMAILSRECEIVED), 4),0) -- ResponseRate 6bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(Round(sum(total_amt_donated)/SUM(TOTALNUMOFMAILSRECEIVED),2),0) -- AvgAmountDonated 8bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMajOR='NONPROFIT', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for nonprofit<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='Congress', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for Congress<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='PAC', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for PAC<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='Senate', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for Senate<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='State', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for State<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='CNP', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for CNP<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='DEF', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for DEF<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='IMM', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for IMM<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='MEM', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for MEM<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='MIL', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for MIL<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='POLICY', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for POLICY<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='REL', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for REL<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='TAX', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for TAX<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(COUNT(distinct LISTID),0) -- NO_OF_ORGS_TARGTED_by 6bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(sum(if (PACKAGEID=InputPackageID, TOTALNUMOFMAILSRECEIVED, 0)),0) -- no. of times seen this package before 3 bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMAJOR='NONPROFIT' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_of NONPROFIT<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='Congress' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofCongress<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='PAC' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofPAC<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='Senate' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofSenate<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='State' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofState<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='CNP' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofCNP<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='DEF' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofDEF<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='IMM' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofIMM<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='MEM' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofMEM<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='MIL' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofMIL<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='POLICY' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofPOLICY<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='REL' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofREL<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='TAX' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofTAX<br>\r\n<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;)<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from&nbsp;&nbsp; &nbsp;PROSPECTSSUMMARY<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; where&nbsp;&nbsp; &nbsp;prospectid = InputProspectID and <br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;MONTHmailed BETWEEN (CurrentDatemailed - INTERVAL MyIntervalMonths&#43;1 MONTH) and (CurrentDatemailed - INTERVAL 1 MONTH)<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AND DATABASEID IN(2,3));<br>\r\n&nbsp;&nbsp;&nbsp; else <br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SET RESULT = (select&nbsp;&nbsp; &nbsp;<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;concat_ws('#',<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;COALESCE(SUM(TOTALNUMOFMAILSRECEIVED),0) -- TotalNumOfMailsReceived 6bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(sum(sum_donated),0) -- TotalNumOfDonationsMade 6bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(Round(sum(sum_donated)/SUM(TOTALNUMOFMAILSRECEIVED), 4),0) -- ResponseRate 6bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(Round(sum(total_amt_donated)/SUM(TOTALNUMOFMAILSRECEIVED),2),0) -- AvgAmountDonated 8bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMajOR='NONPROFIT', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for nonprofit<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='Congress', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for Congress<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='PAC', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for PAC<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='Senate', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for Senate<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='State', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for State<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='CNP', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for CNP<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='DEF', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for DEF<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='IMM', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for IMM<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='MEM', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for MEM<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='MIL', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for MIL<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='POLICY', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for POLICY<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='REL', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for REL<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='TAX', TOTALNUMOFMAILSRECEIVED, 0))/sum(TOTALNUMOFMAILSRECEIVED),4),0) -- share of mail for TAX<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(COUNT(distinct LISTID),0) -- NO_OF_ORGS_TARGTED_by 6bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,coalesce(sum(if (PACKAGEID=InputPackageID, TOTALNUMOFMAILSRECEIVED, 0)),0) -- no. of times seen this package before 3 bytes<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMAJOR='NONPROFIT' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_of NONPROFIT<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='Congress' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofCongress<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='PAC' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofPAC<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='Senate' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofSenate<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='State' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofState<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='CNP' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofCNP<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='DEF' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofDEF<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='IMM' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofIMM<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='MEM' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofMEM<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='MIL' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofMIL<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='POLICY' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofPOLICY<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='REL' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofREL<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;,COALESCE(Round(SUM(IF(VECTORMINOR='TAX' , TOTAL_AMT_DONATED, 0))/SUM(TOTAL_AMT_DONATED), 4),0) -- donation_share_ofTAX<br>\r\n<br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;)<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from&nbsp;&nbsp; &nbsp;PROSPECTSSUMMARY<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; where&nbsp;&nbsp; &nbsp;prospectid = InputProspectID and <br>\r\n&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;MONTHmailed BETWEEN (CurrentDatemailed - INTERVAL MyIntervalMonths&#43;1 MONTH) and (CurrentDatemailed - INTERVAL 1 MONTH)<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AND DATABASEID =InputDatabaseID);<br>\r\n&nbsp;&nbsp;&nbsp; END IF;<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RETURN result;<br>\r\n&nbsp;&nbsp;&nbsp; END<br>\r\n&nbsp;&nbsp;&nbsp; //<br>\r\n&nbsp; DELIMITER ; <br>\r\n&nbsp;</p>\r\n<p>[/code]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 14677,
      "author_name": "sashikanthdareddy",
      "author_url": "",
      "post_date": "09/21/2012 19:36:13",
      "content": "<p>And these are the variables I've created.</p>\r\n<p>Comp1-comp37 are the prinicpal components extracted from the demographic dataset provided. These 37 PCs capture ~95% of the variation.</p>\r\n<p>Those prefixed with</p>\r\n<p>PR: prospect related variables</p>\r\n<p>ZP: zip level variables</p>\r\n<p>LS: listid level variables</p>\r\n<p>PKPH: Packageid - phase level variables</p>\r\n<p>LSPH: listid - phase level variables.</p>\r\n<p>Suffixed:</p>\r\n<p>L1M: last 1month</p>\r\n<p>L3M: last 3months and so on for L6M &amp; L9M.</p>\r\n<p>Using whatever I knew about working on MySQL, all my udf's were tuned for performance (used a lot of indexes&nbsp; - somemay say it was a bit of an overkill).</p>\r\n<p>I found that when I was creating my training dataset it was taking an awful amount of time. So I parallelised my queries the &quot;poor man's&quot; way. Basically I've opened 8 connections to my database and each connection was working on creating these variables\r\n on only 1million rows each. This reduced the amount of time required to prepare my training dataset dramatically. It took about 5hours. I&nbsp; estimated it would take a good few days if I left it to run on just 1 connection.</p>\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"width:861px\">\r\n<colgroup><col span=\"2\" width=\"258\"><col width=\"345\"></colgroup>\r\n<tbody>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">ROW_ID</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofMIL_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_PAC_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">AMOUNT2</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofPOLICY_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_Senate_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_1</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofREL_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_State_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_2</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofTAX_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_CNP_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_3</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_TotalNumOfMailsReceived_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_DEF_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_4</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_TotalNumOfDonationsMade_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_IMM_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_5</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_ResponseRate_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_MEM_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_6</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_AvgAmountDonated_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_MIL_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_7</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_nonprofit_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_POLICY_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_8</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_Congress_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_REL_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_9</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_PAC_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_TAX_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_10</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_Senate_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_of_NONPROFIT_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_11</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_State_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofCongress_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_12</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_CNP_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofPAC_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_13</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_DEF_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofSenate_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_14</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_IMM_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofState_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_15</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_MEM_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofCNP_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_16</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_MIL_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofDEF_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_17</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_POLICY_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofIMM_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_18</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_REL_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofMEM_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_19</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_TAX_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofMIL_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_20</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_NO_OF_ORGS_TARGTED_by_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofPOLICY_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_21</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_No_of_times_package_seen_b4_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofREL_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_22</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_of_NONPROFIT_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofTAX_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_23</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofCongress_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_ResponseRate_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_24</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofPAC_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_AvgAmountDonated_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_25</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofSenate_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_nonprofit_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_26</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofState_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_Congress_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_27</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofCNP_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_PAC_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_28</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofDEF_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_Senate_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_29</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofIMM_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_State_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_30</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofMEM_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_CNP_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_31</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofMIL_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_DEF_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_32</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofPOLICY_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_IMM_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_33</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofREL_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_MEM_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_34</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofTAX_L6M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_MIL_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_35</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_TotalNumOfMailsReceived_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_POLICY_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_36</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_TotalNumOfDonationsMade_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_REL_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMP_37</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_ResponseRate_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_TAX_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">COMPS_IMPUTED</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_AvgAmountDonated_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_of_NONPROFIT_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_TotalNumOfMailsReceived_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_nonprofit_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofCongress_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_TotalNumOfDonationsMade_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_Congress_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofPAC_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_ResponseRate_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_PAC_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofSenate_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_AvgAmountDonated_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_Senate_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofState_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_nonprofit_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_State_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofCNP_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_Congress_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_CNP_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofDEF_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_PAC_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_DEF_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofIMM_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_Senate_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_IMM_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofMEM_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_State_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_MEM_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofMIL_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_CNP_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_MIL_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofPOLICY_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_DEF_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_POLICY_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofREL_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_IMM_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_REL_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofTAX_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_MEM_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_share_of_mail_for_TAX_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_ResponseRate_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_MIL_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_NO_OF_ORGS_TARGTED_by_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_AvgAmountDonated_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_POLICY_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_No_of_times_package_seen_b4_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_nonprofit_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_REL_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_of_NONPROFIT_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_Congress_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_TAX_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofCongress_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_PAC_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_NO_OF_ORGS_TARGTED_by_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofPAC_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_Senate_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_No_of_times_package_seen_b4_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofSenate_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_State_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_of_NONPROFIT_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofState_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_CNP_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofCongress_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofCNP_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_DEF_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofPAC_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofDEF_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_IMM_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofSenate_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofIMM_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_MEM_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofState_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofMEM_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_MIL_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofCNP_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofMIL_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_POLICY_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofDEF_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofPOLICY_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_REL_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofIMM_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofREL_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_share_of_mail_for_TAX_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofMEM_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">PR_donation_share_ofTAX_L9M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_of_NONPROFIT_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofMIL_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_ResponseRate_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofCongress_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofPOLICY_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_AvgAmountDonated_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofPAC_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofREL_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_share_of_mail_for_nonprofit_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofSenate_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofTAX_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_share_of_mail_for_Congress_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofState_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_TotalNumOfMailsReceived_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_share_of_mail_for_PAC_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofCNP_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_TotalNumOfDonationsMade_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_share_of_mail_for_Senate_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofDEF_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_ResponseRate_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_share_of_mail_for_State_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofIMM_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_AvgAmountDonated_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_share_of_mail_for_CNP_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofMEM_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_nonprofit_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_share_of_mail_for_DEF_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofMIL_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_Congress_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_share_of_mail_for_IMM_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofPOLICY_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_PAC_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_share_of_mail_for_MEM_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofREL_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_Senate_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_share_of_mail_for_MIL_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">ZP_donation_share_ofTAX_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_State_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_share_of_mail_for_POLICY_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">LS_ResponseRate_L1M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_CNP_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_share_of_mail_for_REL_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">LS_AvgAmountDonated_L1M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_DEF_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_share_of_mail_for_TAX_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">LS_ResponseRate_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_IMM_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_donation_share_of_NONPROFIT_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">LS_AvgAmountDonated_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_MEM_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_donation_share_ofCongress_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">LS_ResponseRate_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_MIL_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_donation_share_ofPAC_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">LS_AvgAmountDonated_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_POLICY_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_donation_share_ofSenate_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">LS_ResponseRate_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_REL_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_donation_share_ofState_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">LS_AvgAmountDonated_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_share_of_mail_for_TAX_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_donation_share_ofCNP_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">PKPH_ResponseRate_L1M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_NO_OF_ORGS_TARGTED_by_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_donation_share_ofDEF_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">PKPH_AvgAmountDonated_L1M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_No_of_times_package_seen_b4_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_donation_share_ofIMM_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">PKPH_ResponseRate_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_of_NONPROFIT_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_donation_share_ofMEM_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">PKPH_AvgAmountDonated_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofCongress_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_donation_share_ofMIL_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">PKPH_ResponseRate_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofPAC_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_donation_share_ofPOLICY_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">PKPH_AvgAmountDonated_L6M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofSenate_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_donation_share_ofREL_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">PKPH_ResponseRate_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofState_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_donation_share_ofTAX_L1M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">PKPH_AvgAmountDonated_L9M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofCNP_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_ResponseRate_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">LSPH_ResponseRate_L1M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofDEF_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_AvgAmountDonated_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">LSPH_AvgAmountDonated_L1M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofIMM_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_share_of_mail_for_nonprofit_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">LSPH_ResponseRate_L3M</td>\r\n</tr>\r\n<tr>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\" height=\"19\">PR_donation_share_ofMEM_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"258\">ZP_share_of_mail_for_Congress_L3M</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">LSPH_AvgAmountDonated_L3M</td>\r\n</tr>\r\n<tr>\r\n<td height=\"19\">&nbsp;</td>\r\n<td>&nbsp;</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">LSPH_ResponseRate_L6M</td>\r\n</tr>\r\n<tr>\r\n<td height=\"19\">&nbsp;</td>\r\n<td>&nbsp;</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">LSPH_AvgAmountDonated_L6M</td>\r\n</tr>\r\n<tr>\r\n<td height=\"19\">&nbsp;</td>\r\n<td>&nbsp;</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">LSPH_ResponseRate_L9M</td>\r\n</tr>\r\n<tr>\r\n<td height=\"19\">&nbsp;</td>\r\n<td>&nbsp;</td>\r\n<td class=\"x_x_x_x_x_x_x_xl65\" width=\"345\">LSPH_AvgAmountDonated_L9M</td>\r\n</tr>\r\n</tbody>\r\n</table>",
      "votes": null,
      "replies": []
    },
    {
      "id": 14679,
      "author_name": "sashikanthdareddy",
      "author_url": "",
      "post_date": "09/21/2012 19:48:48",
      "content": "<p>If the competition organiser is cool with my posting my training &amp; test dataset (total 5GB .rar files) with the above mentioned variables for anyone to have a stab at with their technique , I'm happy to do so, hopefully they can derive better predictive\r\n performance than I could.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 14756,
      "author_name": "fundraising",
      "author_url": "",
      "post_date": "09/24/2012 19:05:15",
      "content": "<p>That is absolutely fine with us - I don't know if anyone is dying to continue to try working on it now that the competition is over, but we are certainly open to more ideas and improvements, to the extent that there are competitors out there interested in\r\n continuing. Thanks!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 14769,
      "author_name": "barrenwuffet",
      "author_url": "",
      "post_date": "09/25/2012 04:12:08",
      "content": "<p>I've been looking at the demographic data and have a question about how it's organized particularly around the STOTPOP or total population.&nbsp; If I take all of the rows with a given city name and sum the STOTPOP columns, the resulting sum is a multiple of\r\n what the actual population is (according to wikipedia).&nbsp; I was wondering if you could tell me how the data is organized as it doesn't appear to be by zip / zip9 / city.&nbsp; In other words if I wanted to find out the population of a given city, how would I do\r\n so?</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "14593": "",
    "14607": "",
    "14621": "",
    "14638": "",
    "14642": "",
    "14674": "",
    "14677": "",
    "14679": "",
    "14756": "",
    "14769": ""
  },
  "source": "meta"
}