How to count Items and get a list
Hello,
1st Database-Situation:
Table with persons, Table with puchasable items, crosstable with Timestamp-Field and Relation to an Item AND to a Person.
Person are able to purchase items, each purchase creates a new entry in Cross-Table.
2nd: My Question/ my need
Lets say Mr Smith has bought
3 Apples at timestamp1,
2 Apples at timestamp2,
1 coffees timestamp 3,
5 apples ts4,
2 Pizza ts5
2 coffees at ts6
Now I need a sub-list for each Person (e.g. Mr Smith), that counts the number of Items he bought. It should look like:
Mr Smith
8 Apples | timestamp1, timestamp2, timestamp4
3 coffees | timestamp3, timestamp6
2 Pizza | timestamp5
How am I able to get a list like this?
3rd my trials:
Sub-Table (view) within Person-Table with function
let this_Person := this;
select items where crosstable.persons = this_Person
Unfortunately this gives no records.
Ninox seems not able to “look through” the cross-table and get the Items referring to the person.
Thanks for help
Claus
1 Antwort
-
exactly Mr. Smith purchased 10 apples :-)
Content aside
- vor 4 JahrenZuletzt aktiv
- 1Antworten
- 353Ansichten