Skip to content

Instantly share code, notes, and snippets.

@coderberry
Created March 29, 2011 17:03
Show Gist options
  • Select an option

  • Save coderberry/892761 to your computer and use it in GitHub Desktop.

Select an option

Save coderberry/892761 to your computer and use it in GitHub Desktop.
blogPost2.sql
SELECT count(l.id)
FROM lead AS l, submission AS s, buyerLog as bl
WHERE l.id = s.leadId
AND s.id = bl.submissionId
AND bl.leadBuyer = $buyerName
AND l.id != $lead.id
AND l.dateCreated::date > $daysAgo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment