what is the function of the underscore ?
If age is non-nullable then the optimiser would essentially convert it to the same query as COUNT(* )
However, if age is nullable, then the query needs to check each row to exclude any where age = null, so may yield different results depedent on the data.
I would count(age) because of readability?
This one didn't pass for me. median needed to be a float (52.5) where my answer gave 52. Even casting as a float wouldn't work.
It was greek to me last week, I am beginning to understand now. Look for Regular Expressions (Regex) documentation, it is a practical syntax for search patterns, although I might agree it hurts the readability of the code.
Heh, we came up with an identical pattern
Eligant solution! Really have to practice regex
You can save the whole iteration of the map function by doing the calculation in each iteration of the reduce function
Didn't thought of this...
You'd have a whole other problem if your list is empty other than reduce here using strictly list.length as the denominator.