title: SQL query to select products by tag in WooCommerce?
body: <p>I have a WooCommerce store with products which are either tagged as a smartphone or tablet. I'm looking for a way of selecting all smartphones from the database so does anyone know the raw SQL query to select all WooCommerce products by their tag?</p>