I have this table:
Name | Weight | Color
1 Cherry | 1 | Red
2 Apple | 4 | Green
3 Pear | 3 | Yellow
I need a view in which only the top row is visible
Cherry | 1 | Red
When the table changes (new record, sorting), the view changes accordingly
Example 1:
Name | Weight V| Color
1 Apple | 4 | Green
2 Pear | 3 | Yellow
3 Cherry | 1 | Red
single row view:
Apple | 4 | Green
Example 2:
Name | Weight | Color
1 Almond | 0.5 | Brown
2 Apple | 4 | Green
3 Pear | 3 | Yellow
4 Cherry | 1 | Red
single row view:
Almond | 0.5 | Brown
This doesn't seem possible. Didn't find anything in related forums.
GPT3 suggestions were selecting a record by row_id
or time_of_creation
fields, but this won't help with table resorting.
It also suggested using SELECT(table_name, {}, {limit: N, fields: ["field_1", "field_2"]})
- but limit
does not work. Same for FIRST()
which doesn't exist.
Any solution to this?