Viewing 15 posts - 16 through 30 (of 125 total)
Yes, I understand the questions, why I am willing to return all rows... stupid i am (it is a common question and probably NOT a good idea to return all...
July 3, 2011 at 10:07 am
The result is same when using COUNT(expression) and COUNT(ALL expression)
try following and see the difference - COUNT(All expression) is giving incorrect results.
-- COUNT(DISTINCT expression)
select VideoTitle,
COUNT(distinct favoriteId) as TotalFavorite,
COUNT(distinct ViewerTrackingId)...
June 15, 2011 at 7:20 am
To solve the problem i may use following:
select VideoTitle,
COUNT(distinct favoriteId) as TotalFavorite,
COUNT(distinct ViewerTrackingId) as TotalViewed,
COUNT(distinct RatingId) as TotalRating
from tblVideo v
left join tblFavorite f on v.VideoId = f.VideoId
left...
June 15, 2011 at 5:34 am
This solved my query: Thank you very much for your time and efforts. appreciated.
;WITH highest_attendance
AS
(SELECT subject, attendance, ROW_NUMBER() OVER
(ORDER BY attendance DESC)
AS rn
FROM (
SELECT 'math'...
May 19, 2011 at 7:34 am
OK, thanks for your suggest. could you plz. make a dynamic query example and let me know how it would be looks like?
The reason is there are different classes with...
May 19, 2011 at 7:25 am
Can't we simple move the colum to rows and get TOP 1. I think there would be another way to do this - right?
I just want to make it sure...
May 19, 2011 at 6:47 am
I used the following simple query and reached on same results as your query results:
select sum(convert(tinyint,Math)) as Math, sum(convert(tinyint,Physics)) as Physics, sum(convert(tinyint,Chemistry)) as Chemistry from results
but i don't know...
May 19, 2011 at 6:31 am
Hello all, I still have this as a question because when on Production, the user context running this script does not have such rights (sysadmin) as we are deploying the...
May 4, 2011 at 1:34 am
Hello Lutz, I have fixed few things from your example as that was not exactly covering my real scenario- Anyway I had resolved them and I made following changes:
1- Limit...
January 1, 2011 at 12:35 am
Lutz, The output is giving number from 1,2,3 up till 70. It should be 50 (Fixed) and its value should be the actual video length divided by 50 with increment...
December 31, 2010 at 7:11 am
Lutz, The output is giving number from 1,2,3 up till 70. It should be 50 (Fixed) and its value should be the actual video length divided by 50 with increment...
December 31, 2010 at 7:09 am
To resolve this I am doing it in two parts:
First query to make data as shown in red table:
declare @userid int
declare @VideoId int
declare @LastUserId int
declare @LastVideoId int
declare @LastVideoTrackingId...
December 31, 2010 at 7:01 am
yes you are right with your few comments but for actual data i have uploaded new file which is the actual Tracked data and explained visually to have to make...
December 31, 2010 at 6:46 am
The first table (written with data with actual question not the red color table in image) is the information how the user viewing is stored in table. And if you...
December 31, 2010 at 6:32 am
Stuck in next step, there are some other values which does not work with my existing function. here is the new sample data:
?link=ProductsAndServices?src=NLVANOV10_lid={5F86099C-AFDD-DF11-80B8-001CC023728E}&stid=1&ptu=1
?src=NLVANOV10_lid={5F86099C-AFDD-DF11-80B8-001CC023728E}&stid=1&ptu=1
Should check both & and _lid both -...
November 22, 2010 at 4:26 am
Viewing 15 posts - 16 through 30 (of 125 total)