From: memalef on
i have one table with various information that is updated by me every time.

i would like to do by query another table that will include four fields:

"COMPANY", "TOTAL", "LAST_MONTH", "LAST_WEEK"

and collect information for all these field by different criteria.

Main table looks like this:

| ID | SHIPPING_DATE | COMPANY_NAME | CHARGE | GLASS | OTHER |

ID - AUTO NUMBER
SHIPPING_DATE - DATE/TIME
CHARGE - CURRENCY
GLASS - CURRENCY
OTHER - CURRENCY

Second table has to be :

| COMPANY | TOTAL | LAST_MONTH | LAST_WEEK |

when field "TOTAL" equal to ("CHARGE" + "GLASS" + "OTHER") GROUP BY
COMPANY_NAME
second field "LAST_MONTH" does same expression and shows only result of last
month
and third shows only result of week.

How can i insert different information into fields of second table ?