Reputation: 21
I have this table that is tracking data, contractions for laboring females.
this is my current table:
Two of the columns are based on data either from their same row or from their row and different rows;
For example, length between is based on the Date.parse(end_time) - Date.parse(start_time)
of its own row.
Another example is the column (sorry just realized its not expanded in the screenshot) called 'time-between'. This is timing the contractions by calculating how many ms passed between start_time
from row0 and the start-time
from row1.start_time[1] - start_time[0]
;
Also would be helpful if i can include a ternary or if
to not include the values that are null (like the very first 'time_between` )
This is my first experiment with Supabase and i hear everything good about how easy it is to make relational data but im having trouble finding out how to use conditional values within the same table.
Googled and Perplexity AI prompts. Searched for my question on StackOverflow. I have queried the data and performed the calculations which i can then use to overwrite but wondering if theres a way to do it when im hardcoding right in the Supabase table instead of pulling all hardcoded values and doing the calculations and returning it (since i get the same result as hardcoding with a lot more calcs)
Upvotes: 0
Views: 151