Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
328 views
in Q2A Core by

Ever wondered, how many people put their email address in the notification field?

// to get all emails listed
SELECT notify FROM `qa_posts` WHERE userid IS NULL and notify IS NOT NULL and notify <> '@'

// to list all emails and show their count (number of occurence)
SELECT notify, COUNT(notify) AS cnt
FROM `qa_posts`
WHERE userid IS NULL
    AND notify IS NOT NULL
    AND notify <> '@'
GROUP BY notify


Hope that helps!

---

To list only the notifications on questions (put in the notify-field on the ask page):

SELECT notify, COUNT(notify) AS cnt
FROM `qa_posts`
WHERE userid IS NULL
    AND notify IS NOT NULL
    AND notify <> '@'
    AND type = 'Q'
GROUP BY notify
 

---

Using the first command you get xxx rows displayed, take this number and divide it by number of questions (see admin stats or use SELECT * FROM `qa_posts` WHERE type='Q')

For me: 1896 notification emails on 10637 questions = 17,8 % of anonymous people leaving their email address.

Please log in or register to answer this question.

...