I'm doing this but the result give me all the names who they are 30 years and less than 30 years.
This is the database:
- Donor ( Donor-ID, First-name, Last-name, Date-of-birth, Sex, Date-of-donate)
- Donor-phone (Donor-ID, Phone-number)
- Clinic (Clinic-ID, Clinic-name, Clinic-Location)
- Blood (Blood-ID, Blood Type)
- The donate day (Blood Status, Donate Date)
- Employee (Employee-ID, First-name, Last-name, Sex)
I used this code - where is it wrong?
SELECT
GETDATE () AS FirstName,
FirstName, LastName,
DATEADD(DD, 30, GETDATE()) AS [DateOfDonate- DateOfBirth],
DATEADD(DD, 1-1-2000, GETDATE()) AS [DonateOfDate]
FROM
Donor
I need to solve this question: find the names of donors who their age is above 30 years and have donated since 1/1/2000