Skip to content

Instantly share code, notes, and snippets.

@chris-huffman
Created July 21, 2020 18:43
Show Gist options
  • Save chris-huffman/e2362da1f0724e04122f6bdae9d2c676 to your computer and use it in GitHub Desktop.
Save chris-huffman/e2362da1f0724e04122f6bdae9d2c676 to your computer and use it in GitHub Desktop.
Pull ParadoxLabs Subscription Data
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