Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Retrieving the count from a derived SQL
Message
From
28/03/2010 21:40:07
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Retrieving the count from a derived SQL
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01457748
Message ID:
01457748
Views:
111
I would like to retrieve the count from a derived SQL. I am not sure about the best approach to use. This is the SQL I have:
SELECT Temp.NoThread
FROM 
(SELECT Top 10 NoThread FROM Thread ORDER BY Numero DESC) Temp
So, in the result, I get all the keys that I need for the most recent 10 threads. However, based on those keys, I would now like to include a column for the count. Thread.NoThread have several occurences in the table. So, the result would include a column for the count having a value from 1 to x.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform