Created
May 23, 2017 20:54
-
-
Save Huholoman/3af41028d9bc78da76d49e8dd5136987 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 * | |
FROM e21 | |
INNER JOIN ( | |
SELECT GROUP_CONCAT(discount_amount) AS discount_amount, | |
GROUP_CONCAT(discount_type) AS discount_type, | |
discount_business_id, | |
discount_subcategory_id, | |
discount_evidence_number | |
FROM e21sle GROUP BY discount_business_id | |
) MAXD ON (business_id=MAXD.discount_business_id) | |
WHERE ((discount_type LIKE '%VIP%' OR discount_type LIKE '%STD%') AND business_eshop<>1 AND business_region_id='C10' AND business_category_id='A' AND business_subcategory_id='0555' AND business_region_id LIKE 'C%') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment