Created
February 4, 2009 22:53
-
-
Save kastner/58407 to your computer and use it in GitHub Desktop.
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
| $sql = "SELECT c.name, c.cust_num, SUM(qty) bottles, | |
| GROUP_CONCAT(h.order_num) orders | |
| FROM orders o INNER JOIN hist h ON h.order_num = o.order_num | |
| INNER JOIN users c ON c.cust_num = o.cust_num | |
| WHERE o.order_num IN ! GROUP BY o.cust_num"; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment