-
-
Save clifgriffin/b926cb06c95b16fcb721 to your computer and use it in GitHub Desktop.
This file contains 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 p.*,count(*) as items | |
FROM (SELECT * FROM wp_shopp_purchase ORDER BY created DESC LIMIT 6) AS p | |
LEFT JOIN wp_shopp_purchased AS i | |
ON i.purchase=p.id | |
GROUP BY i.purchase |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment