Microsoft Access
| DoctorID | FirstName | LastName | OfficeNumber | PrimarySpecialty | MoveInDate |
|---|---|---|---|---|---|
| 1 | Robert | Beyer | 101 | Cardiovascular Disease | 2/15/12 |
| 2 | Elizabeth | Scher | 115 | Pediatrics | 3/1/14 |
| 3 | Emy | Ostrander | 101 | Cardiovascular Disease | 11/8/14 |
| 4 | Mararet | Foster | 200 | Pediatrics | 7/1/05 |
| 5 | Ricardo | Flores | 151 | Internal Medicine | 3/1/14 |
| 6 | Juan | Camacho | 180 | Dermatology | 6/1/10 |
| 7 | Alicia | Alamar | 151 | Internal Medicine | 2/20/11 |
| 8 | James | Hennessy | 220 | Pediatrics | 7/1/10 |
| 9 | Rick | Plice | 305 | Family Medicine | 3/15/08 |
| 10 | Daniel | Dyer | 115 | Pediatrics | 3/1/14 |
| 11 | Robyn | Singh | 210 | Family Medicine | 6/1/13 |
| 12 | Steven | Norman | 230 | Internal Medicine | 12/15/07 |
| 13 | Randy | Ansari | 180 | Dermatology | 4/1/12 |
| 14 | Kumara | Pelayo | 210 | Family Medicine | 5/15/07 |
| InvoiceID | InvoiceDate | DueDate | AmountDue | FKDoctorID | Description | DateReceived | Discount |
|---|---|---|---|---|---|---|---|
| 1 | 3/17/14 | 4/1/14 | ¤ 1,200.00 | 1 | April 2014 Rent (Beyer & Ostrander) | 3/30/14 | ¤ 12.00 |
| 2 | 3/17/14 | 4/1/14 | ¤ 1,000.00 | 2 | April 2014 Rent (Scher & Dyer) | 4/1/14 | |
| 3 | 3/17/14 | 4/1/14 | ¤ 1,300.00 | 4 | April 2014 Rent | 4/1/14 | |
| 4 | 3/17/14 | 4/1/14 | ¤ 1,300.00 | 5 | April 2014 Rent (Flores & Alamar) | 3/29/14 | ¤ 26.00 |
| 5 | 3/17/14 | 4/1/14 | ¤ 1,000.00 | 6 | April 2014 Rent (Camacho & Ansari) | 3/31/14 | |
| 6 | 3/17/14 | 4/1/14 | ¤ 1,500.00 | 8 | April 2014 Rent | 4/1/14 | |
| 7 | 3/17/14 | 4/1/14 | ¤ 1,250.00 | 9 | April 2014 Rent | 4/1/14 | |
| 8 | 3/17/14 | 4/1/14 | ¤ 1,500.00 | 11 | April 2014 Rent (Singh & Pelayo) | 4/1/14 | |
| 9 | 3/17/14 | 4/1/14 | ¤ 1,500.00 | 12 | April 2014 Rent | 3/29/14 | ¤ 30.00 |
| 10 | 4/14/14 | 5/1/14 | ¤ 1,200.00 | 1 | May 2014 Rent (Beyer & Ostrander) | 4/29/14 | ¤ 12.00 |
| 11 | 4/14/14 | 5/1/14 | ¤ 1,000.00 | 2 | May 2014 Rent (Scher & Dyer) | 5/1/14 | |
| 12 | 4/14/14 | 5/1/14 | ¤ 1,300.00 | 4 | May 2014 Rent | 5/1/14 | |
| 13 | 4/14/14 | 5/1/14 | ¤ 1,300.00 | 5 | May 2014 Rent (Flores & Alamar) | 4/28/14 | ¤ 26.00 |
| 14 | 4/14/14 | 5/1/14 | ¤ 1,000.00 | 6 | May 2014 Rent (Camacho & Ansari) | 5/1/14 | |
| 15 | 4/14/14 | 5/1/14 | ¤ 1,500.00 | 8 | May 2014 Rent | 5/1/14 | |
| 16 | 4/14/14 | 5/1/14 | ¤ 1,250.00 | 9 | May 2014 Rent | 5/1/14 | |
| 17 | 4/14/14 | 5/1/14 | ¤ 1,500.00 | 11 | May 2014 Rent (Singh & Pelayo) | 5/1/14 | |
| 18 | 4/14/14 | 5/1/14 | ¤ 1,500.00 | 12 | May 2014 Rent | 4/28/14 | ¤ 30.00 |
| 19 | 5/16/14 | 6/1/14 | ¤ 1,200.00 | 1 | June 2014 Rent (Beyer & Ostrander) | 5/30/14 | ¤ 12.00 |
| 20 | 5/16/14 | 6/1/14 | ¤ 1,000.00 | 2 | June 2014 Rent (Scher & Dyer) | 6/1/14 | |
| 21 | 5/16/14 | 6/1/14 | ¤ 1,300.00 | 4 | June 2014 Rent | 6/1/14 | |
| 22 | 5/16/14 | 6/1/14 | ¤ 1,300.00 | 5 | June 2014 Rent (Flores & Alamar) | 5/29/14 | ¤ 26.00 |
| 23 | 5/16/14 | 6/1/14 | ¤ 1,000.00 | 6 | June 2014 Rent (Camacho & Ansari) | 5/30/14 | ¤ 10.00 |
| 24 | 5/16/14 | 6/1/14 | ¤ 1,500.00 | 8 | June 2014 Rent | 6/1/14 | |
| 25 | 5/16/14 | 6/1/14 | ¤ 1,250.00 | 9 | June 2014 Rent | 6/1/14 | |
| 26 | 5/16/14 | 6/1/14 | ¤ 1,500.00 | 11 | June 2014 Rent (Singh & Pelayo) | 6/1/14 | |
| 27 | 5/16/14 | 6/1/14 | ¤ 1,500.00 | 12 | June 2014 Rent | 5/29/14 | ¤ 30.00 |
| 28 | 6/17/14 | 7/1/14 | ¤ 1,200.00 | 1 | July 2014 Rent (Beyer & Ostrander) | 7/1/14 | |
| 29 | 6/17/14 | 7/1/14 | ¤ 1,000.00 | 2 | July 2014 Rent (Scher & Dyer) | 7/1/14 | |
| 30 | 6/17/14 | 7/1/14 | ¤ 1,300.00 | 4 | July 2014 Rent | 7/1/14 | |
| 31 | 6/17/14 | 7/1/14 | ¤ 1,300.00 | 5 | July 2014 Rent (Flores & Alamar) | 7/1/14 | |
| 32 | 6/17/14 | 7/1/14 | ¤ 1,000.00 | 6 | July 2014 Rent (Camacho & Ansari) | 6/29/14 | ¤ 10.00 |
| 33 | 6/17/14 | 7/1/14 | ¤ 1,500.00 | 8 | July 2014 Rent | 7/1/14 | |
| 34 | 6/17/14 | 7/1/14 | ¤ 1,250.00 | 9 | July 2014 Rent | 7/1/14 | |
| 35 | 6/17/14 | 7/1/14 | ¤ 1,500.00 | 11 | July 2014 Rent (Singh & Pelayo) | 6/27/14 | ¤ 30.00 |
| 36 | 6/17/14 | 7/1/14 | ¤ 1,500.00 | 12 | July 2014 Rent | 7/1/14 | |
| 37 | 7/16/14 | 8/1/14 | ¤ 1,200.00 | 1 | August 2014 Rent (Beyer & Ostrander) | 8/1/14 | |
| 38 | 7/16/14 | 8/1/14 | ¤ 1,000.00 | 2 | August 2014 Rent (Scher & Dyer) | 8/1/14 | |
| 39 | 7/16/14 | 8/1/14 | ¤ 1,300.00 | 4 | August 2014 Rent | 7/29/14 | ¤ 26.00 |
| 40 | 7/16/14 | 8/1/14 | ¤ 1,300.00 | 5 | August 2014 Rent (Flores & Alamar) | 8/1/14 | |
| 41 | 7/16/14 | 8/1/14 | ¤ 1,000.00 | 6 | August 2014 Rent (Camacho & Ansari) | 7/27/14 | ¤ 20.00 |
| 42 | 7/16/14 | 8/1/14 | ¤ 1,500.00 | 8 | August 2014 Rent | 8/1/14 | |
| 43 | 7/16/14 | 8/1/14 | ¤ 1,250.00 | 9 | August 2014 Rent | 8/1/14 | |
| 44 | 7/16/14 | 8/1/14 | ¤ 1,500.00 | 11 | August 2014 Rent (Singh & Pelayo) | 8/1/14 | |
| 45 | 7/16/14 | 8/1/14 | ¤ 1,500.00 | 12 | August 2014 Rent | 7/30/14 | ¤ 15.00 |
| 46 | 8/15/14 | 9/1/14 | ¤ 1,200.00 | 1 | September 2014 Rent (Beyer & Ostrander) | 8/30/14 | ¤ 12.00 |
| 47 | 8/15/14 | 9/1/14 | ¤ 1,000.00 | 2 | September 2014 Rent (Scher & Dyer) | 9/1/14 | |
| 48 | 8/15/14 | 9/1/14 | ¤ 1,300.00 | 4 | September 2014 Rent | 8/29/14 | ¤ 26.00 |
| 49 | 8/15/14 | 9/1/14 | ¤ 1,300.00 | 5 | September 2014 Rent (Flores & Alamar) | 9/1/14 | |
| 50 | 8/15/14 | 9/1/14 | ¤ 1,000.00 | 6 | September 2014 Rent (Camacho & Ansari) | 9/1/14 | |
| 51 | 8/15/14 | 9/1/14 | ¤ 1,500.00 | 8 | September 2014 Rent | 9/1/14 | |
| 52 | 8/15/14 | 9/1/14 | ¤ 1,250.00 | 9 | September 2014 Rent | 9/1/14 | |
| 53 | 8/15/14 | 9/1/14 | ¤ 1,500.00 | 11 | September 2014 Rent (Singh & Pelayo) | 8/28/14 | ¤ 30.00 |
| 54 | 8/15/14 | 9/1/14 | ¤ 1,500.00 | 12 | September 2014 Rent | 9/1/14 |
SELECT Physicians.FirstName, Physicians.LastName
FROM Physicians INNER JOIN RentInvoices ON Physicians.DoctorID = RentInvoices.FKDoctorID
WHERE (((RentInvoices.Discount)>=0))
GROUP BY Physicians.FirstName, Physicians.LastName;
SELECT RentInvoices.InvoiceID, RentInvoices.InvoiceDate, RentInvoices.DueDate
FROM RentInvoices
WHERE (((RentInvoices.DueDate)>#6/30/2014#));
SELECT [Physicians]![FirstName] & " " & [Physicians]![LastName] AS Doctor, RentInvoices.InvoiceID, RentInvoices.DateReceived, RentInvoices.AmountDue, [DueDate]-[DateReceived] AS DaysPaidEarly, RentInvoices.Discount, [AmountDue]-[Discount] AS NetRent
FROM Physicians INNER JOIN RentInvoices ON Physicians.DoctorID = RentInvoices.FKDoctorID
WHERE (((Physicians.LastName)=[Enter the last name or leave blank to select all doctors])) OR (((RentInvoices.DueDate) Between [Enter Starting Date] And [Enter the Ending Date]));
SELECT Physicians.FirstName, Physicians.LastName, Count(RentInvoices.InvoiceID) AS CountOfInvoiceID
FROM Physicians INNER JOIN RentInvoices ON Physicians.DoctorID = RentInvoices.FKDoctorID
GROUP BY Physicians.FirstName, Physicians.LastName;
SELECT Physicians.DoctorID, Physicians.FirstName, Physicians.LastName, Count(RentInvoices.InvoiceID) AS CountOfInvoiceID
FROM Physicians INNER JOIN RentInvoices ON Physicians.DoctorID = RentInvoices.FKDoctorID
GROUP BY Physicians.DoctorID, Physicians.FirstName, Physicians.LastName;
SELECT Count(RentInvoices.Discount) AS CountOfDiscount
FROM Physicians INNER JOIN RentInvoices ON Physicians.DoctorID = RentInvoices.FKDoctorID
HAVING (((Count(RentInvoices.Discount))>=0));
SELECT RentInvoices.[InvoiceID], RentInvoices.[InvoiceDate], RentInvoices.[DueDate], RentInvoices.[DateReceived]
FROM RentInvoices
WHERE (((RentInvoices.DateReceived)<[DueDate]))
GROUP BY RentInvoices.[InvoiceID], RentInvoices.[InvoiceDate], RentInvoices.[DueDate], RentInvoices.[DateReceived];