Oracle APEX Join and Count
<p>I have two tables created with SQL code:</p>

<pre><code>CREATE TABLE 
TicketSales(
    purchase# Number(10),
    client# Integer CONSTRAINT fk1 REFERENCES Customers,
    PRIMARY KEY(purchase#));

CREATE TABLE Customers(
    client# Integer,
    name Char(30),
    Primary Key(client#);
</code></pre>

<p>Basically table TicketSales holds ticket sales data and client# is foreign key referenced in customers table. I would like to count names that are in TicketSales table. i tried below code with no success:</p>

<pre><code>select Count(name)
From Customers 
Where Customers.Client#=TicketSales.Client#
Group by Name;
</code></pre>

<p>Any help appreciated.</p>

<p>Thanks, </p>