Created
March 29, 2011 17:03
-
-
Save coderberry/892761 to your computer and use it in GitHub Desktop.
blogPost2.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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