Can anyone please tell me if I am doing this query right?

stupith3ros

New Member
I have this question in some book I am reading right now..I am a beginner to SQl..learning it..it is not my homework. I am just trying stuff on my own..Sally wants to query the EMP table and determine how many of the employees live in each of the cities the company has factories in. She writes the following query but it does not work. What is wrong with the way the query is constructed?\[code\]SELECT city, COUNT(emp_no) as "Number of Customers"FROM empORDER BY cityGROUP BY city; \[/code\]This is what I did by referring to some other query which had count and group By used in it...I think we also need WHERE clause too in this query..how can i do it??\[code\]SELECT empid,count(*)
 
Top