title: MySQL > How to count items per brand then display "brand name" and "number of items" in rows / two separate columns?
body: <p>I am very new in MySQL so I guess my issue will be quite easy to fix for MySQL specialists.
  I am building a Wordpress site with Crocoblock JetEngine to reference used vehicles.</p>
  <p>Here is how the table is structured : <a href="https://i.stack.imgur.com/U5AfW.png" rel="nofollow noreferrer">screenshot : wp_686591_postmeta</a></p>
  <p>I need to create SQL queries to display statistics. I am facing an issue.</p>
  <p>I was able to build the below query to count the number of vehicles per brand :</p>
  <p>SELECT COUNT(meta_key) as 'nombre de véhicules' FROM <code>wp_686591_postmeta</code> WHERE <code>meta_key</code> = 'marque'
  GROUP BY meta_value;</p>
  <p>The query returns the number of vehicles per brand as you can see on the screenshot <a href="https://i.stack.imgur.com/Xq7E1.png" rel="nofollow noreferrer">screenshot : number-of-vehicles-per-brand</a> but brands are not displayed. I've tried many combinations, watched tutorials but none of the queries work the way I want.</p>
  <p>How may I add the brands so each row displays the brand name in the first column and the total number of vehicles in the second column ?</p>
  <p>French &gt; English :</p>
  <p>nombre de véhicules = number of vehicles;</p>
  <p>marque = brand</p>
  <p>Many thanks for any help on this !</p>