Last active
August 29, 2015 14:07
-
-
Save claudinec/39e4908776bdd784431e to your computer and use it in GitHub Desktop.
ascm select and group addresses
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 GROUP_CONCAT(name SEPARATOR ' and ') AS name, | |
company_name, primary_address_1, primary_address_2, primary_city, primary_state, primary_postal_code, primary_country | |
FROM db | |
GROUP BY primary_address_1, primary_address_2, primary_city, primary_state, primary_postal_code, primary_country | |
ORDER BY primary_country, primary_postal_code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment