|
|
| Physical Data Model for City Licences |
|
|
|
|
|
|
|
|
  |
A Physical Data Model is shown on this page, and a Conceptual Model is also available.
Here is the SQL to produce Total Licences by Area and Year ...
SELECT Areas.AreaName,Persons.YearNumber,COUNT(*) FROM Areas,City,Community,Licences,Persons WHERE Area.AreaCode = Community.AreaCode AND Community.CommunityCode=City.CommunityCode AND City.CityCode = Persons.CityCode AND Persons.PersonID = Licences.PersonID AND Persons.YearNumber = Licences.YearNumber GROUP BY AreaName,YearNumber; |
|
Barry Williams
Principal Consultant
Database Answers