|
I don't know if it's right, my understanding is limited, and I will answer according to my own understanding.
If the first table is data, the second table recommends that you do not make a table, it is more appropriate to make a View.
If the first table uses year and month as the standard for grouping, you can use six bytes of character data to represent the year and month, such as:
YearMonth C (6) // '200602' or directly use date data {^ 2007-02-01}, the following can be created
A View
Create View second table As;
Select YearMonth, Count (YearMonth) As Counts, Sum (Total) As Totals;
From the first table Group By YearMonth
Then open this view at any time, and you can dynamically get the relevant data in the first table at any time. |
|