Question: I don't have much background in sentiment analysis or natural language processing at all, but I have been reading a bit about it in my spare time. I would like to conduct and experiment to analyze forum threads/comments such as reddit, digg, blogs, etc. I'm particularity interested in doing something like counting the number of for, against, and neutral comments for threads of heated religious and political debates. Here's what I am thinking.

1) Find a thread that the original poster has defined a touchy political or religious topic.

2) For each comment categorize it as supporting the original poster or otherwise taking a contradicting or neutral stance. 

3) Compare various mediums with the numbers of for or against arguments to determine what platforms are good "debate platforms" (i.e. balanced argument counts).

One big problem that I'm anticipating is that heated topics will invoke strong reactions from both supporting and contradicting parties so a simple happy/sad sentiment analysis won't cut it. I'm just sort of interested in this project for my own curiosities, so if anyone knows of similar research or utilities to conduct this experiment I'd be interested to hear more. 

Can someone recommend a good sentiment analysis, word dictionary, training set, etc. for this task?

Answer: 
This can be done purely in SQL:

### Number of First time buyers:

```
SELECT
  COUNT(DISTINCT CustomerID) 
FROM Orders 
WHERE OrderDate BETWEEN <startdate> AND <enddate>
/* Buyers with only one order record */
AND CustomerID IN (SELECT CustomerID FROM Orders GROUP BY CustomerID HAVING COUNT(*)=1)

```

### Number of repeat buyers:

```
SELECT
  COUNT(DISTINCT CustomerID) 
FROM Orders 
WHERE OrderDate BETWEEN <startdate> AND <enddate>
/* Buyers with more than one order record */
AND CustomerID IN (SELECT CustomerID FROM Orders GROUP BY CustomerID HAVING COUNT(*)>1)

```
Total new buyers
SELECT c.\*
FROM Customers c, Orders o
WHERE c.CustomerID = o.CustomerID 
AND c.CustomerID not in(SELECT o1.CustomerID from Orders o1)

Total returning buyers
Total new buyers
SELECT c.\*
FROM Customers c, Orders o
WHERE c.CustomerID = o.CustomerID 
AND c.CustomerID in(SELECT o1.CustomerID from Orders o1)

you can add time frame to both queries