Hadoop Hive analytic functions compute an aggregate value that is based on a group of rows. A Hadoop Hive HQL analytic function works on the group of rows and ignores the NULL in the data if you specify Hadoop Hive COUNT Analytic Function Returns number of rows in query or group of rows. Syntax: COUNT(column reference | value expression | *) over(window_spec) For Example; select pat_id, dept_id, count(*) over (partition by dept_id order by dept_id asc) as pat_cnt from patient; at_id dept_id pat_cnt 6 111 4 2 111 4 5 111 4 1 111 4 4 222 3 5 222 3 3 222 3 7 333 1 8 444 1 Hadoop Hive SUM Analytic Function Just like count function, sum Hive analytic function is used to compute the sum of columns or expression. Sum analytic function is used to compute the sum of all rows of table or rows within the groups. Syntax: SUM(column | expression) OVER( window_spec) For example: Calculate sum insured amount of all patients within each department...
1. The Art of R Programming by Norm Matloff Link : https://bit.ly/1ydgTrJ 2. Mining with Rattle and R by Graham Williams Link : https://bit.ly/2h7YgGm 3. ggplot2 by Hadley Wickham Link : https://bit.ly/2Dt8AmP 4. R for Data Science by Garrett Grolemund , Hadley Wickham Link : https://bit.ly/2tfmalX 5. R in Action by Robert Kabacoff Link : https://bit.ly/2tLgOQp 6. Machine Learning with R by Brett Lantz Link : https://bit.ly/2KtNPaT 7. R and Data Mining: Examples and Case Studies by Yanchang Zhao Link : https://bit.ly/2sD4QtW 8. The R Book by Michael J. Crawley Link : https://bit.ly/2BPobcO 9. An Introduction to Statistical Learning in R by Gareth James, Daniela Witten Link : https://bit.ly/1iUJso0 10. R through Excel Link : https://bit.ly/2lF0sVN NOTE : PDF links is not a copyright infringement, they are f...
In MongoDB a collection is automatically created when it is referenced in any command. For example, if you run an insert command : db. student . insert ({ name : " Viraj " }) Above command will create a collection named student if it doesn't exist already in the database. But we can explicitly create a collection using the createCollection() command. The syntax of createCollection method is : db. createCollection ( name , options ) In the above command, name will be the name of the collection and options is a document which can be used to specify configurations for the collection. options parameter is optional, and you can simply create a collection by just providing a name for the collection. But if you want to configure your collection, you can use various options available to do so. Following are the available configuration options for creating a collection in MongoDB : Field Type Description capped boolean (Option...
Comments
Post a Comment