Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
1sqlover
Yak Posting Veteran
56 Posts |
Posted - 2006-10-13 : 14:04:53
|
Is it possible to create an alias (ProductID, COUNT(*) AS PIDCount) and show all ProductID > 25?Thanks |
|
X002548
Not Just a Number
15586 Posts |
|
snSQL
Master Smack Fu Yak Hacker
1837 Posts |
Posted - 2006-10-13 : 14:12:25
|
I think you have completely misunderstood the meaning of aliases, read up on them in Books Online. I think you're perhaps meaning that you want a derived table which would use an alias, but in fact this query won't need a derived table.It will be something like thisSELECT ProductID, count(*)FROM YourTableGROUP BY ProductIDHAVING count(*) > 25Read up on grouping and aggregate functions to learn more. |
 |
|
|
|
|