Reputation: 71
i have data in this table.
so i want the output to look like table
what is the SQL for that?
Upvotes: 0
Views: 41
Reputation: 39497
Simple. GROUP BY
and COUNT
.
select
customer_no,
items,
count(*) "COUNT"
from your_table
group by customer_no,
items;
Upvotes: 3