Created
November 16, 2010 10:06
-
-
Save billdozr/701651 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
SELECT r.name, b.amount_incl_tax, | |
(SELECT l.name from labeling_label l INNER JOIN labeling_labeleditem li | |
ON li.label_id=l.id AND li.object_id=b.id AND li.content_type_id=28 LIMIT 1) AS labels | |
FROM billing_genericbill b | |
INNER JOIN billing_recipient r ON b.recipient_id=r.id | |
ORDER BY labels |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment