Back to Blog
DevelopmentDevelopmentMagentoMySQLSQL

How to find out what user used what coupon code in Magento

Easily export a list of all orders and their associated coupon usage for Magento orders using SQL

(Updated April 22, 2020)
2 min read
200 words
How to find out what user used what coupon code in Magento

The Problem with Magento and Coupon Codes

Magento comes pre-built with a ton of great reporting options for things like sales, shopping cart, products, customer reviews and more. Unfortunately within Magento there is no easy way to get an exported list of all orders with the associated coupon code that was used. Thankfully a little magic, mixed with some SQL can solve that for us!

View the SQL query on GitHub Gist