Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 213819

Counting "active" companies

$
0
0

Hi,

 

my simplified data is as follows:

 

TABLE1

CompanyID

CompanyName

 

TABLE2

ProductID

ProductName

ProductCreatedDate

CompanyID

 

TABLE3

InvoiceNumber

InvoiceDate

ProductID

I know how to find active companies last month based on created products (DistinctCount(CompanyID) where ProductCreatedDate(month) = LastMonth)

I know how to find active companies last month based on sold products (DistinctCount(CompanyID) where InvoiceDate(month) = LastMonth)

But how do I find a count of active companies for a given month, that has sold AND/OR created a product?

Thank you in advance for your help.


Viewing all articles
Browse latest Browse all 213819

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>