PhpMyAdmin SQL query to return multiple records on inner joined tables with count

I have two tables in a database, ‘invoices’ and ‘customers’. I am trying to create a query which displays a list of customers that have placed two or more orders. The following statements work if I only look at a single customer (in this case customer with id ‘C120’).

SELECT `invoices`.date,`customers`.name FROM `invoices` 
INNER JOIN `customers` 
ON `invoices`.cust_id=`customers`.cust_id 
WHERE `invoices`.cust_id = 'C120'
HAVING COUNT(`invoices`.date) >=2;

However I would like a view of all customers meeting the search criteria.

I have tried using LIKE in the following form:

WHERE (`customers`.`cust_id` LIKE 'C%')

(all customer ids are four characters beginning with ‘C’) but all this does is return the first customer in ‘customers’ which dosen’t even satisfy the >= 2 condition.Also tried

WHERE `invoices`.cust_id = 'C*' 

which returns an empty set.

I have run out of ideas and would appreciate some help, thanks.

The customer table is as follows:

cust_id     name
C100    Bloggs
C110    Pekkonen
C120    Finklefluffle

The invoice table is:

date    cust_id     amount
2017-10-09  C100    27.78
2017-11-28  C110    409.66
2017-10-17  C110    2729.3
2017-10-09  C120    2.66
2017-11-06  C110    300
2017-11-21  C120    59.65

What I want the reult to be is:

C110 Pekkonen
C120 Finklefluffle

or even better

C110 Pekkonen 3
C120 Finklefluffle 2

What I get with

WHERE (`customers`.`cust_id` LIKE 'C%')

is completely wrong:

C100    Bloggs 

and what I get with

WHERE `invoices`.cust_id = 'C*'

is ’empty data set’ .. also incorrect.

Answer

You may try this

    SELECT `customers`.cust_id , `customers`.name, count(*) FROM `invoices` 
    INNER JOIN `customers` 
    ON `invoices`.cust_id=`customers`.cust_id 
    GROUP BY `customers`.cust_id , `customers`.name
    HAVING COUNT(`invoices`.date) >=2;