Guest_imported
New member
- Jan 1, 1970
- 0
hi
I have a table customer which stores customer's info.
I have to find which state has the most customers.
I have to print out the state and the number of customers in that state only.
my query is:
select state, max(total) from customer,
(select count(state) as total from customer group by state)
this gives me a syntax error. In fact, I have tried many different ways to do it but they woulnd't work.
Can anyone help me out here? Thanx in advance.
I have a table customer which stores customer's info.
I have to find which state has the most customers.
I have to print out the state and the number of customers in that state only.
my query is:
select state, max(total) from customer,
(select count(state) as total from customer group by state)
this gives me a syntax error. In fact, I have tried many different ways to do it but they woulnd't work.
Can anyone help me out here? Thanx in advance.