G
Guest
Hi,
MyTable is as follows:
InvoiceNumber;EntityName;SupplierName;CategoryName;Spend
Invoice1;Entity1;Supplier1;Category1;Spend1
Invoice1;Entity1;Supplier2;Category1;Spend2
Invoice3;Entity2;Supplier1;Category1;Spend3
I would like to retrieve the following data in a query (named as
QueryEntity) without any intermediate query:
EntityName; CountOfSupplier; CountOfCategory;SumOfSpend; CountOfInvoice
Entity1;2;1;Spend1+Spend2;1
Entity2;1;1;Spend3;1
Please note that a mere Count function does not help (for instance, it would
return CountOfCategory = 2 for Entity1).
Eventually, I would like to build the same query for Supplier
(QuerySupplier) and Category (QueryCategory), as follows:
QuerySupplier: SupplierName; CountOfEntity; CountOfCategory;SumOfSpend;
CountOfInvoice
QueryCategory: CategoryName; CountOfSupplier; CountOfEntity;SumOfSpend;
CountOfInvoice
Do you think it is possible?
Thank you in advance
MyTable is as follows:
InvoiceNumber;EntityName;SupplierName;CategoryName;Spend
Invoice1;Entity1;Supplier1;Category1;Spend1
Invoice1;Entity1;Supplier2;Category1;Spend2
Invoice3;Entity2;Supplier1;Category1;Spend3
I would like to retrieve the following data in a query (named as
QueryEntity) without any intermediate query:
EntityName; CountOfSupplier; CountOfCategory;SumOfSpend; CountOfInvoice
Entity1;2;1;Spend1+Spend2;1
Entity2;1;1;Spend3;1
Please note that a mere Count function does not help (for instance, it would
return CountOfCategory = 2 for Entity1).
Eventually, I would like to build the same query for Supplier
(QuerySupplier) and Category (QueryCategory), as follows:
QuerySupplier: SupplierName; CountOfEntity; CountOfCategory;SumOfSpend;
CountOfInvoice
QueryCategory: CategoryName; CountOfSupplier; CountOfEntity;SumOfSpend;
CountOfInvoice
Do you think it is possible?
Thank you in advance