Created
July 21, 2020 18:43
-
-
Save chris-huffman/e2362da1f0724e04122f6bdae9d2c676 to your computer and use it in GitHub Desktop.
Pull ParadoxLabs Subscription Data
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 | |
s.increment_id, | |
c.firstname, | |
c.lastname, | |
qa.city, | |
qa.region, | |
qa.postcode | |
FROM | |
`paradoxlabs_subscription` AS s | |
JOIN `customer_entity` AS c ON s.customer_id = c.entity_id | |
JOIN `quote` AS q ON s.quote_id = q.entity_id | |
JOIN `quote_address` AS qa ON q.entity_id = qa.quote_id | |
WHERE | |
s.status = 'active' | |
AND qa.address_type = 'shipping' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment