amillyard
asked on
SQL search / results from 2 tables
Using SQL Server 2008 Management Studio
Table 1: MasterAccounts
PK MasterAccount_ID int
LeadSourceProvider_ID int
Table 2: LeadSourceProviders
PK LeadSourceProvider_ID int
LeadSourceProviderName nvarchar(50)
the result I am looking for is as follows (when executing the sql script) :
LeadSourceProviderName, [count of Master Accounts using that LeadSourceProviderName)
LeadSourceProviders has a 1-to-Many relationship with MasterAccounts table.
How would you construct a SQL query to do this please?
Table 1: MasterAccounts
PK MasterAccount_ID int
LeadSourceProvider_ID int
Table 2: LeadSourceProviders
PK LeadSourceProvider_ID int
LeadSourceProviderName nvarchar(50)
the result I am looking for is as follows (when executing the sql script) :
LeadSourceProviderName, [count of Master Accounts using that LeadSourceProviderName)
LeadSourceProviders has a 1-to-Many relationship with MasterAccounts table.
How would you construct a SQL query to do this please?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER