Wonderfull Tutorial.... clearly and precisely explained... in less than 10 minutes... Bravo....
@dataexplained73054 жыл бұрын
Thanks a lot, friend. More coming soon !! So, Stay tuned...
@sauravgupta15473 жыл бұрын
you are showing how to use percent rank and cume_dist...not what they are and what they are doing....how do we interpret the results?
@dataexplained73053 жыл бұрын
Check the docs.Microsoft, Cume_dist function calculates the cumulative distribution of a value within a group of values. In other words, CUME_DIST calculates the relative position of a specified value in a group of values. Assuming ascending ordering, the CUME_DIST of a value in row r is defined as the number of rows with values less than or equal to that value in row r, divided by the number of rows evaluated in the partition or query result set. CUME_DIST is similar to the PERCENT_RANK function which returns the rank of a value in a data set as a percentage of the data set. This function can be used to evaluate the relative standing of a value within a data set. For example, you can use PERCENTRANK to evaluate the standing of an aptitude test score among all scores for the test
@chandudatta66112 жыл бұрын
how can we get only rank 1 records in the given syntax =
@dataexplained73052 жыл бұрын
Does this help ? Alias(rename) the rank column and then Add a where clause to filter out the rank =1.
@954giggles2 жыл бұрын
What if you have null values in PERCENT_RANK
@dataexplained73052 жыл бұрын
Can you send me a sample data and I can check and get back.. dataandyou@gmail.com
@JMK5894 жыл бұрын
If I wanted to reference these columns for a later calculation. Would I need to add them to the data?
@dataexplained73054 жыл бұрын
Thanks for the comment. You are correct. You need to add it as a column to an entity(Table or View). You can create a table something like this... CREATE TABLE new_table AS (SELECT * .......) alternatively you can also create a view and then reference the view. Remember the view will not have memory and will reference the table behind it when you call it.