|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Thursday, May 27, 2010 1:31 PM
Points: 132,
Visits: 101
|
|
| Comments posted to this topic are about the item COUNT_BIG
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: 2 days ago @ 12:43 AM
Points: 584,
Visits: 1,574
|
|
Gosh, I'm the FIRST person to answer this QotD!
Thanks for the questions Prakriti.
S.
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Thursday, April 11, 2013 12:58 AM
Points: 174,
Visits: 555
|
|
I read up what is the definition of count_big before I answered half-blindly. I never used it before and I may use it only years from now, since our transactional data is still too far from 2 billion rows (int, 4 bytes).
But thanks anyway.
*edited - our table with highest number of rows is still too far from even 10 million.
|
|
|
|
|
SSCoach
         
Group: General Forum Members
Last Login: Yesterday @ 3:33 PM
Points: 18,858,
Visits: 12,443
|
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Yesterday @ 3:10 PM
Points: 2,319,
Visits: 6,105
|
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Thursday, April 11, 2013 12:58 AM
Points: 174,
Visits: 555
|
|
[b]CirquedeSQLeil (3/9/2010)
The answers are: SELECT COUNT_BIG(*) and SELECT COUNT_BIG(column_2).
This sentence does not match the correct answers. It seems somewhat confusing and could create a bit of a stir.
This is wiered...I answered II and III, thereby getting both correct? SELECT COUNT_BIG(column_2) SELECT COUNT_BIG(ALL column_2)
ALL is the default and hence COUNT_BIG(column 2) is same as COUNT_BIG(ALL column_2). This evaluates expression for each row in a group and returns the number of nonnull values.
Maybe the first paragraph of the explanation was wrong?
The answers are: SELECT COUNT_BIG(*) and SELECT COUNT_BIG(column_2). COUNT_BIG(*) will count all rows from the table (including duplicate & null rows). COUNT_BIG(DISTINCT column_2) will evaluate distinct non-null values.
If the correct answers are different from mine, it's alright for me to have my points deducted. I know I will never be able to verify the answers without wrecking my server's disk space or processing power.
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Friday, December 21, 2012 5:24 AM
Points: 366,
Visits: 436
|
|
Thanks for the question..hurray I got it correct...but only after reading explanation about it in BOL...I never heard about it before...but its a very useful function... Yes..the explanation given by OP was wrong..answer II and III is absolutely correct.
|
|
|
|
|
Say Hey Kid
      
Group: General Forum Members
Last Login: Monday, February 18, 2013 5:19 AM
Points: 703,
Visits: 172
|
|
| Thanks for the question. Learn something new today.
|
|
|
|
|
Say Hey Kid
      
Group: General Forum Members
Last Login: Thursday, June 13, 2013 5:24 AM
Points: 666,
Visits: 151
|
|
| Great question, made you think about the simple functions that we take for granted, even though i have never needed to use count_big
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Monday, June 10, 2013 3:53 AM
Points: 267,
Visits: 664
|
|
the answer is I and II , not II and III.
does anyone audit these questions? i want my point (joke) :)
|
|
|
|