Associate
Hello,
I have two tables, one is called Company, the other called Sites.
Company has the following:
Company ID (key)
Company name
Sites has the following:
Site id (key)
Company Name (matches the table above)
Site Name
Site URL
Its a very simple database, more of a test application currently. Each Company has many sub Sites.
All I want to do is have a Master table with the following info:
Company ID, Company Name, (number of sub) Sites
How can I run a query that will do this for me?
In psuedo code, basically its:
SELECT all
FROM both tables
WHERE company ID is the same in both
Then count the above and display a number in my table
Any help greatfully appreciated!
I have two tables, one is called Company, the other called Sites.
Company has the following:
Company ID (key)
Company name
Sites has the following:
Site id (key)
Company Name (matches the table above)
Site Name
Site URL
Its a very simple database, more of a test application currently. Each Company has many sub Sites.
All I want to do is have a Master table with the following info:
Company ID, Company Name, (number of sub) Sites
How can I run a query that will do this for me?
In psuedo code, basically its:
SELECT all
FROM both tables
WHERE company ID is the same in both
Then count the above and display a number in my table
Any help greatfully appreciated!