Hi !
I'm searching a select statement to show my table in groups.
Id like to show al members living in city: "a" and at the end of the list a number showing how many living in "A".
Than city "B" and at the end the total of members.
i wrote:
and recieved an error message saying:
I'm searching a select statement to show my table in groups.
Id like to show al members living in city: "a" and at the end of the list a number showing how many living in "A".
Than city "B" and at the end the total of members.
i wrote:
Code:
select
lastname,
city,
count(city)
from
mytable
group by city
Could anyone please tell me how i can show all members' details grouped by CITY field ?olumn 'LASTNAME' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.