Talk:Big Hardware Donations

From FreekiWiki
Revision as of 12:40, 4 January 2006 by Halfasspete (talk | contribs) (compiled data into table)
Jump to navigation Jump to search

I can probably pull some stats from the database if given some criteria, like a minimum dollar amount to look for or a minimum number of lines in a receipt. RfS

That would be helpful. I'd start with 2005 only. (I'm interested in the long haul as well, but it's less important.) Maybe try over $100, but increase that number if it pulls up too much. At this stage I'd like to see maybe 15 company names. I like your line number idea as well, so use whichever method you think it's better. Many thanks, --Pete 10:18, 3 Jan 2006 (PST)
This is great. Gives me a good idea of the scope of things. Contact info would be very helpful (even just a person's name.) I'd like to contact a few of these for testimonials. Also, just to be sure I got these right- the last column is the number of systems? And OnPoint Credit Union = Portland Teachers Credit Union? --Pete 11:18, 4 Jan 2006 (PST)


donations of 25+ systems, with org name and date of donation.

(note the top two came in from the same donor in a one week period)

after you get what you want, we should remove the raw data, but the SQL might be nice to re-create this again.

RfS 17:06, 3 Jan 2006 (PST)

SELECT donationid, MAX( donation.created ) AS created, MAX( organization ) AS org, SUM(quantity) FROM donationline LEFT JOIN donation ON donationline.donationid = donation.id LEFT JOIN contact ON donation.contactid = contact.id WHERE description ILIKE '%system%' GROUP BY 1 HAVING SUM(quantity) >= 25 ORDER BY 4 DESC;

donationid |            created            |                     org                     | sum
-----------+-------------------------------+---------------------------------------------+-----
     13332 | 2004-06-16 15:16:38-07        | Viablelinks, Inc.                           |  73
      5876 | 2003-02-25 00:00:00-08        | OTAK                                        |  71
      4297 | 2002-09-27 00:00:00-07        | Hoffman Construction                        |  70
      6178 | 2003-03-21 00:00:00-08        | Powell's Books                              |  68
     17629 | 2004-12-30 14:02:20.017766-08 | Industrial Design Corp.                     |  63
      3427 | 2002-07-02 00:00:00-07        | St. Helens Computer Center                  |  60
       723 | 2001-05-09 00:00:00-07        | Oregon Episcopal School                     |  58
     15751 | 2004-10-07 11:53:32.597446-07 | Estacada School District                    |  54
     14559 | 2004-08-11 11:17:19.901352-07 | Precision Interconnect                      |  51
     17215 | 2004-12-15 11:35:46.506987-08 | Industrial Design Corp.                     |  50
     10645 | 2004-02-11 00:00:00-08        | ODS Company                                 |  48
      6585 | 2003-04-24 00:00:00-07        | Sheerwater Support Services                 |  46
     14255 | 2004-07-28 13:37:10.390426-07 | St. Mary\'s Academy                         |  46
     10595 | 2004-02-07 00:00:00-08        | Sauer-Danfoss                               |  44
       551 | 2001-03-29 00:00:00-08        | Bright Wood Corp.                           |  42
     10123 | 2004-01-14 00:00:00-08        | Willamette Week                             |  41
     14152 | 2004-07-21 19:02:56.111239-07 | SRG Partnership Inc.                        |  41
     13952 | 2004-07-13 16:43:04-07        | US Probation Attn: Jack Codrou              |  40
     16063 | 2004-10-23 13:11:20.367096-07 | Stoel Rives LLP                             |  37
     15951 | 2004-10-19 11:32:43.544972-07 | Nickel Ads                                  |  36
      9362 | 2003-11-19 00:00:00-08        | K. Robert Allen, Inc. / Docupro Services    |  35
     13049 | 2004-06-03 13:23:41-07        | Lewis & Clark College, IT Dept MSC97        |  34
      8896 | 2003-10-21 00:00:00-07        | Janus Youth Services                        |  33
     12639 | 2004-05-11 17:06:22-07        | Legal Aid                                   |  33
     11276 | 2004-03-10 00:00:00-08        | Electra Cental Credit Union                 |  31
     16190 | 2004-10-29 14:18:56.975467-07 | Central City Concern                        |  30
     15050 | 2004-09-07 12:34:33.990779-07 | Christenson Velagio                         |  30
     13203 | 2004-06-10 13:45:18-07        | The ArtInstitute of Portland                |  30
     11161 | 2004-03-05 00:00:00-08        | Housing Authority of Portland               |  30
     16775 | 2004-11-23 15:45:48.954956-08 | More for the Buck                           |  29
     16442 | 2004-11-09 14:10:10.563814-08 | Starseed Foundation                         |  29
     15704 | 2004-10-05 15:39:16.00947-07  | St Anthony School                           |  28
      1588 | 2001-08-08 00:00:00-07        | Fiducial Columbia Turel Bookeping & Tax     |  28
      7130 | 2003-06-11 00:00:00-07        | Grady Britton                               |  27
     14705 | 2004-08-19 11:39:19.85555-07  | Precision Interconnect                      |  26
     12836 | 2004-05-21 13:38:17-07        | Northwest Primary Care Group                |  26
      2316 | 2002-02-14 00:00:00-08        | Pacific Northwest Academy                   |  26
     17298 | 2004-12-17 14:55:49.247632-08 | Hercules, Inc                               |  25

other results

Here are some other numbers. 11 donors > 500 in 2005. 14 above 400, etc. Past years included. Tell me what you want. RfS

First two queries (of five) below, followed by a table compiling all 5 years' data for 5 categories.

fgdb=# SELECT EXTRACT( YEAR FROM created ), COUNT(*) FROM donation WHERE cashdonation + monitorfee >= 500 GROUP BY 1 ORDER BY 1;

fgdb=# SELECT EXTRACT( YEAR FROM created ), COUNT(*) FROM donation WHERE cashdonation + monitorfee >= 400 GROUP BY 1 ORDER BY 1;



$500 & up 400 & up 300 & up 200 & up 100 & up
2001 1 2 2 5 17
2002 1 2 4 11 51
2003 3 5 12 22 98
2004 19 24 33 63 193
2005 11 14 28 68 253