Not sure if you are asking whether your schema is good or how to get the right information so here's both:
I would update your schema to this:
Customer (p_key = CustomerId)
- CustomerId (int)
- FirstName (varchar)
- LastName (varchar)
Phone (p_key = CustomerId, PhoneType, DateEffective) Customers may have multiple phone types (cell, home, work) and may give you multiples of those (got a new number). You can either overwrite or keep history with a DateTime the number became effective.
- CustomerId (int)
- PhoneType (varchar)
- DateEffective (datetime)
- AreaCode (varchar) - don't use numbers if possible to start with 0's
- PhoneNumber (varchar) - don't use numbers if possible to start with 0's
Address (p_key = CustomerId, AddressType, DateEffective) Mailing and Physical Addresses, and history like Phone.
- CustomerId (int)
- AddressType (varchar)
- DateEffective (datetime)
- Street1 (varchar)
- Street2 (varchar)
- City (varchar)
- State (varchar)
- Zip (varchar) - don't use numbers since some zip's start with 0's
Treatment (p_key = TreamentId)
- TreatmentId (int)
- Type (varchar)
TreatmentStage (p_key = TreamentId, Stage)
- TreatmentId (int)
- Stage (int)
- Description (varchar)
Visit (p_key = all columns) Customer could have multiple treatments/treatment stages on the same day.
- CustomerId (int)
- TreatmentId (int)
- TreatmentStage (int)
- DateVisit (datetime)
Appointment (p_key = CustomerId, AppointmentDate, AppointmentTime) You can combine AppointmentDate and AppointmentTime into AppointmentDateTime though this isn't how most people would think of it.
- Type (varchar)
- AppointmentDate (date)
- AppointmentTime (time)
- CommentId (int)
- CustomerId (int)
Transaction (p_key = TransactionId)
- TransactionId
- Type (varchar)
- TransactionTimestamp (datetime)
- CommentId (int)
- CustomerId (int)
Comment (p_key = CommentId) This gets your free form text out of all of your other tables and centralizes it in Comment. This will with performance as most of time you do not need to load the comments plus the data will likely be over the default page size.
- CommentId (int)
- Comment (varchar)
Code (p_key = CodeType, Code)
- CodeType (varchar)
- Code (varchar)
- CodeDescription (varchar)
Code table should store your "Types" (ApportionmentType, TransactionType, Phone Type, etc.) so you have a list of the codes, their descriptions, and you can use that in join criteria if needed (reporting).
The query part is pretty straight forward:
SELECT c.*
FROM Visit v
INNER JOIN Customer c
on v.CustomerId = c.CustomerId
WHERE v.DateVisit > DATE_ADD(NOW(), INTERVAL 1 YEAR)