In this article, I will use a code example to show you how to output the number of canceled FooEvents tickets via an SQL query of the WordPress database.