SQL and Map-Reduce-Filter
We'll see how the map, reduce and filter methods prove useful in SQL queries.
We'll cover the following...
We'll cover the following...
Exercise:
Suppose the following tables are given in the form of arrays of objects:
Translate the following SQL query using map, reduce, and filter:
You are not allowed to use loops, if statements, logical operators, or the ternary operator.
Solution:
We need to list all character names and the sum of the value of their items.
As characters and inventory are arrays, we can use the map, reduce, and filter. ...