Difference between revisions of "Talk:Big Hardware Donations"

From FreekiWiki
Jump to navigation Jump to search
(some results)
Line 1: Line 1:
 
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. [[User:Rfs|RfS]]
 
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. [[User:Rfs|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, --[[User:Halfasspete|Pete]] 10:18, 3 Jan 2006 (PST)
 
: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, --[[User:Halfasspete|Pete]] 10:18, 3 Jan 2006 (PST)
 +
 +
== some results ==
 +
 +
Here are some numbers. 11 donors > 500 in 2005. 14 above 400, etc. Past years included. Tell me what you want. [[User:Rfs|RfS]]
 +
 +
fgdb=# SELECT EXTRACT( YEAR FROM created ), COUNT(*) FROM donation WHERE cashdonation + monitorfee >= 500 GROUP BY 1 ORDER BY 1;
 +
date_part | count
 +
-----------+-------
 +
      2001 |    1
 +
      2002 |    1
 +
      2003 |    3
 +
      2004 |    19
 +
      2005 |    11
 +
(5 rows)
 +
 +
fgdb=# SELECT EXTRACT( YEAR FROM created ), COUNT(*) FROM donation WHERE cashdonation + monitorfee >= 400 GROUP BY 1 ORDER BY 1;
 +
date_part | count
 +
-----------+-------
 +
      2001 |    2
 +
      2002 |    2
 +
      2003 |    5
 +
      2004 |    24
 +
      2005 |    14
 +
(5 rows)
 +
 +
fgdb=# SELECT EXTRACT( YEAR FROM created ), COUNT(*) FROM donation WHERE cashdonation + monitorfee >= 300 GROUP BY 1 ORDER BY 1;
 +
date_part | count
 +
-----------+-------
 +
      2001 |    2
 +
      2002 |    4
 +
      2003 |    12
 +
      2004 |    33
 +
      2005 |    28
 +
(5 rows)
 +
 +
fgdb=# SELECT EXTRACT( YEAR FROM created ), COUNT(*) FROM donation WHERE cashdonation + monitorfee >= 200 GROUP BY 1 ORDER BY 1;
 +
date_part | count
 +
-----------+-------
 +
      2001 |    5
 +
      2002 |    11
 +
      2003 |    22
 +
      2004 |    63
 +
      2005 |    68
 +
(5 rows)
 +
 +
fgdb=# SELECT EXTRACT( YEAR FROM created ), COUNT(*) FROM donation WHERE cashdonation + monitorfee >= 100 GROUP BY 1 ORDER BY 1;
 +
date_part | count
 +
-----------+-------
 +
      2001 |    17
 +
      2002 |    51
 +
      2003 |    98
 +
      2004 |  193
 +
      2005 |  253
 +
(5 rows)

Revision as of 17:53, 3 January 2006

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)

some results

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

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

date_part | count

+-------

     2001 |     1
     2002 |     1
     2003 |     3
     2004 |    19
     2005 |    11

(5 rows)

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

date_part | count

+-------

     2001 |     2
     2002 |     2
     2003 |     5
     2004 |    24
     2005 |    14

(5 rows)

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

date_part | count

+-------

     2001 |     2
     2002 |     4
     2003 |    12
     2004 |    33
     2005 |    28

(5 rows)

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

date_part | count

+-------

     2001 |     5
     2002 |    11
     2003 |    22
     2004 |    63
     2005 |    68

(5 rows)

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

date_part | count

+-------

     2001 |    17
     2002 |    51
     2003 |    98
     2004 |   193
     2005 |   253

(5 rows)