tricky sql problem

Results 1 to 4 of 4

Thread: tricky sql problem

  1. #1
    neils Guest

    Default tricky sql problem

    Hello,<BR><BR>I need your expert opinions on how to pull this off :)<BR><BR>I have a table with a list of names, email addresses, and the number of e-mails I&#039;ve sent to each address.<BR><BR>I&#039;d like to write an SQL statement that will grab some of these records, and at the same time, increment the &#039;count&#039; column for each record that I&#039;ve selected. Is there a good way to do this?

  2. #2
    Jeff Gilulie Guest

    Default No help for Spammers here.

    Are you a spammer? Sounds suspicious to me.

  3. #3
    Neils Guest

    Default RE: No help for Spammers here.

    We send e-mails to users who sign up for product offers on our site, and monthly newsletters to our affiliates. No unsolicited e-mail.

  4. #4
    Join Date
    Dec 1969

    Default RE: tricky sql problem

    Say your table has these columns: <BR> name(varchar), <BR> email(varchar), <BR> email_sent(int;1&#1240), <BR> email_date(datetime)<BR><BR>You query will look like,<BR><BR>select name, email, sum(email_sent) as email_count<BR>from members<BR>group by email<BR><BR>above assumes that each email sent will record on entry in the DB.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts