Hey guys!
I have a question, about a select that I make in the virtual column called “total”, this column is responsible for making a select all of all quantities of products sold, but I wanted this select to select these sales grouped by date. In other words: if I sold 10 items on day 1 and on day 2 I sold 3 that each of the items would be shown on their respective sale dates. Please, someone can help me? tjanks!
that is my select code:
You don’t need a SELECT statement.
- You have a Products table.
- You have a Sales table, with columns: “Product” that is Ref to the Products table, an “Amount” column, and a “Sale Date” column.
- In the Products table, you’ll then have an automatically-generated reverse-reference virtual column called “Related Sales”, under each row of the Products table.
- You can get the sum of all sales of the products by: SUM([Related Sales][Amount]).
- Set the Inline view of the Sales table, so that it is grouped by the “Sale Date” column.
- Set the aggregation in this view by the sum of the “Amount” column.
Now you have it, under each product in the Products table, you’ll have an inline view of the related sales, grouped by the sale date, and the total amount of sale of this product per date.