Use case or problem
I’d love to run something a bit more analytical with my bases, for example I have a bases table for my cat that lists their weights, time recorded, and how hungry they are.
views:
- type: table
name: Table
filters:
and:
- file.inFolder("Personal/Pets/Pet Weights")
- for_pet == PetName
order:
- time_recorded
- weight
- weight_unit
- hunger_scale
sort:
- property: time_recorded
direction: DESC
I would love to add more information, such as weight/time deltas that in a traditional DB I would have used a window function to create. For example sql servers LAG function:
SELECT
time_recorded
, weight
, weight_unit
, hunger_scale
, weight - LAG(weight) OVER (ORDER BY time_recorded) AS weight_delta
FROM ...
Proposed solution
Some SQL like window function to help produce these more analytical breakdowns. Alternatively sub base_view that is filtered to 1 row and timestamp before the current row.
Current workaround (optional)
None that I’m aware of.