SQL where clause to work with Group by clause after performing a count()
- by Matt
Tried my usual references at w3schools and google. No luck
I'm trying to produce the following results. QTY is a derived column
| Position | QTY
--------------------
1 Clerk 2
2 Mgr 2
Here's what I'm not having luck with:
SELECT Position, Count(position) AS 'QTY'
FROM tblemployee
Where ('QTY' != 1)
GROUP BY Position
I know that my Position is set up as varchar(255)
Count produces a integer data and my where clasue is accurate so that leads me to believe that that Count() is jamming me up. Please throw up an example so I can reference later. Thanks for the help!