|
|
|
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: Wednesday, April 03, 2013 10:05 PM
Points: 584,
Visits: 1,571
|
|
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: Thursday, May 16, 2013 1:46 PM
Points: 18,732,
Visits: 12,329
|
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: 2 days ago @ 7:15 AM
Points: 2,260,
Visits: 5,931
|
|
I too had to look up COUNT_BIG in BOL since i wasn't even aware it existed. So thanks for the question, I learned something new yet again. Still got the answer wrong though. I realized a split second after clicking the Answer button that the point was gone :-(
--------------------------------------------------------------------------
The function of good software is to make the complex appear to be simple. (Grady Booch)
|
|
|
|
|
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.
|
|
|
|
|
SSChasing Mays
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 2:28 AM
Points: 656,
Visits: 148
|
|
| 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, February 11, 2013 7:58 AM
Points: 267,
Visits: 662
|
|
the answer is I and II , not II and III.
does anyone audit these questions? i want my point (joke) :)
|
|
|
|