Case 2: activities and follow-ups

A customer database lives on its activities: who needs a call back today, and who has nobody talked to for a long time? Three queries answer that.

In short: due and open are criteria in one row (FollowUp <=#2026-11-30#, Done No). Max under the date returns the last activity. “No activity since June” is asked the other way round: all customers who are not in the list of customers with an activity from June.

Task 1: due follow-ups

Task Which follow-ups are due by 30 Nov 2026 and not done yet? Show Company, FollowUp and Notes, the oldest follow-up first.

Customers 24 rows, 9 columns
CustomerIDCompanyContactNamePostalCodeCityCountryEmailPaymentTermsCustomerSince
1Bauer Plumbing LtdHenry Davies80202DenverUSAhenry.davies@example.com1416 Sep 2020
2Northlight PublishingJames WalkerEC1A 1BBLondonUKjames.walker@example.com3014 May 2024
3Shaw & Partners AccountantsAva Brown02108BostonUSAava.brown@example.com3013 Sep 2020
4Summit Consulting IncGrace TaylorM1 1AEManchesterUKgrace.taylor@example.com3023 Nov 2020
5City UtilitiesMia Evans02108BostonUSA3025 Jun 2024
6Market Street ClinicOlivia SmithEC1A 1BBLondonUKolivia.smith@example.com3014 Jun 2019
7Roth Legal LLPNoah Davies80202DenverUSAnoah.davies@example.com1425 Sep 2020
8Weber LogisticsSophia Smith02108BostonUSAsophia.smith@example.com3022 Mar 2019
9Krause BakeryAva Taylor80202DenverUSAava.taylor@example.com3010 Oct 2019
10Lindner MotorsLiam Smith80202DenverUSAliam.smith@example.com3030 Nov 2021
11Lakeview HotelAva WilsonG1 1XQGlasgowUKava.wilson@example.com305 Sep 2020
12Hansen PrintingOlivia JohnsonEC1A 1BBLondonUKolivia.johnson@example.com309 Jul 2021
13Fisher ElectricalMia ClarkBS1 4DJBristolUK3030 Aug 2023
14Talbot Town CouncilAva DaviesLS1 1URLeedsUKava.davies@example.com148 Jul 2022
15Sunshine NurseryGrace EvansBS1 4DJBristolUKgrace.evans@example.com308 Jul 2022
16Wolf Brewing CoLiam EvansM1 1AEManchesterUKliam.evans@example.com301 Sep 2022
17Newman OpticiansAva Evans02108BostonUSAava.evans@example.com1410 May 2021
18Cook Dental PracticeMia Taylor80202DenverUSAmia.taylor@example.com141 Jun 2020
19Richter RealtyLucas Walker02108BostonUSAlucas.walker@example.com305 Mar 2024
20Bloom Garden CentreLiam ClarkEC1A 1BBLondonUKliam.clark@example.com1410 Feb 2019
21Vogt JoineryEmma EvansLS1 1URLeedsUK3030 Jun 2024
22Baker Dance SchoolAva EvansLS1 1URLeedsUKava.evans@example.com3024 Jun 2021
23Cathedral PharmacyNoah WalkerBS1 4DJBristolUKnoah.walker@example.com3025 Mar 2023
24Meyer PhysioLucas TaylorLS1 1URLeedsUKlucas.taylor@example.com1410 May 2022
Activities 70 rows, 7 columns
ActivityIDCustomerIDActivityDateActivityTypeNotesFollowUpDone
131 Feb 2025CallWorkshop date agreed2 Mar 2025☑
222 Feb 2025CallWorkshop date agreed☐
31128 Feb 2025CallSupport case discussed18 Mar 2025☑
477 Mar 2025EmailQuote sent☐
51612 Mar 2025CallWorkshop date agreed2 Apr 2025☑
62111 Apr 2025CallQuestion about invoice12 May 2025☐
71012 Apr 2025CallWorkshop date agreed☐
81625 Apr 2025EmailDocuments sent19 May 2025☑
9181 May 2025MeetingAnnual review30 May 2025☑
10143 May 2025EmailQuote sent☐
11245 May 2025CallInterested in training2 Jun 2025☑
1265 May 2025CallInterested in training25 May 2025☑
131924 May 2025CallSupport case discussed☐
1433 Jun 2025CallQuestion about invoice☐
152021 Jun 2025MeetingWorkshop prepared16 Jul 2025☑
161823 Jul 2025CallSupport case discussed☐
17427 Jul 2025EmailFeedback on quote16 Aug 2025☑
1841 Aug 2025CallSupport case discussed28 Aug 2025☑
19231 Aug 2025CallQuestion about invoice30 Aug 2025☑
20312 Aug 2025CallSupport case discussed4 Sep 2025☑
212110 Sep 2025CallQuestion about invoice☐
221115 Sep 2025MeetingSupport plan presented23 Sep 2025☑
231018 Sep 2025CallSupport case discussed17 Oct 2025☑
24721 Oct 2025CallInterested in training☐
25217 Nov 2025EmailQuote sent21 Nov 2025☑
26189 Nov 2025MeetingAnnual review27 Nov 2025☑
27212 Nov 2025MeetingAnnual review☐
28514 Nov 2025CallQuestion about invoice☐
29313 Jan 2026MeetingWorkshop prepared☐
301313 Jan 2026MeetingAnnual review24 Jan 2026☑
31116 Jan 2026EmailFeedback on quote☐
32219 Feb 2026EmailQuote sent☐
332213 Feb 2026CallInterested in training27 Feb 2026☑
341219 Feb 2026MeetingAnnual review4 Mar 2026☑
35620 Feb 2026EmailQuote sent2 Mar 2026☑
361628 Feb 2026EmailDocuments sent☐
3727 Mar 2026CallQuestion about invoice☐
38623 Mar 2026MeetingWorkshop prepared22 Apr 2026☑
39172 May 2026MeetingWorkshop prepared1 Jun 2026☐
40615 May 2026CallQuestion about invoice7 Jun 2026☐
411717 May 2026CallWorkshop date agreed19 Jun 2026☑
42621 May 2026EmailQuote sent9 Jun 2026☑
4329 Jun 2026MeetingSupport plan presented☐
442220 Jun 2026EmailDocuments sent27 Jun 2026☐
45228 Jun 2026MeetingWorkshop prepared15 Jul 2026☑
46329 Jun 2026MeetingSupport plan presented14 Jul 2026☑
47107 Jul 2026MeetingAnnual review☐
48168 Jul 2026MeetingWorkshop prepared☐
491214 Jul 2026MeetingWorkshop prepared☐
502221 Jul 2026CallInterested in training☐
511621 Jul 2026EmailDocuments sent☐
52727 Jul 2026MeetingWorkshop prepared☐
53182 Aug 2026CallWorkshop date agreed14 Aug 2026☑
54213 Aug 2026CallWorkshop date agreed☐
551414 Aug 2026MeetingAnnual review☐
56321 Aug 2026CallQuestion about invoice☐
572130 Aug 2026CallSupport case discussed☐
5884 Sep 2026CallSupport case discussed9 Oct 2026☑
59610 Sep 2026CallWorkshop date agreed24 Sep 2026☑
601014 Sep 2026CallSupport case discussed☐
61314 Sep 2026EmailDocuments sent23 Sep 2026☑
622119 Sep 2026EmailQuote sent☐
632429 Sep 2026CallInterested in training☐
64215 Oct 2026CallWorkshop date agreed☐
651117 Oct 2026EmailFeedback on quote24 Oct 2026☐
661622 Oct 2026CallQuestion about invoice26 Nov 2026☐
672013 Nov 2026MeetingWorkshop prepared☐
68322 Nov 2026CallInterested in training3 Dec 2026☐
69224 Nov 2026CallQuestion about invoice☐
701926 Nov 2026EmailQuote sent15 Dec 2026☐

You filter a Yes/No field with Yes or No. The lesson on And and Or covers criteria.

Task 2: last activity per customer

Task When was the last activity with each customer? Show Company and the date of the last activity, the longest ago first.

Customers 24 rows, 9 columns
CustomerIDCompanyContactNamePostalCodeCityCountryEmailPaymentTermsCustomerSince
1Bauer Plumbing LtdHenry Davies80202DenverUSAhenry.davies@example.com1416 Sep 2020
2Northlight PublishingJames WalkerEC1A 1BBLondonUKjames.walker@example.com3014 May 2024
3Shaw & Partners AccountantsAva Brown02108BostonUSAava.brown@example.com3013 Sep 2020
4Summit Consulting IncGrace TaylorM1 1AEManchesterUKgrace.taylor@example.com3023 Nov 2020
5City UtilitiesMia Evans02108BostonUSA3025 Jun 2024
6Market Street ClinicOlivia SmithEC1A 1BBLondonUKolivia.smith@example.com3014 Jun 2019
7Roth Legal LLPNoah Davies80202DenverUSAnoah.davies@example.com1425 Sep 2020
8Weber LogisticsSophia Smith02108BostonUSAsophia.smith@example.com3022 Mar 2019
9Krause BakeryAva Taylor80202DenverUSAava.taylor@example.com3010 Oct 2019
10Lindner MotorsLiam Smith80202DenverUSAliam.smith@example.com3030 Nov 2021
11Lakeview HotelAva WilsonG1 1XQGlasgowUKava.wilson@example.com305 Sep 2020
12Hansen PrintingOlivia JohnsonEC1A 1BBLondonUKolivia.johnson@example.com309 Jul 2021
13Fisher ElectricalMia ClarkBS1 4DJBristolUK3030 Aug 2023
14Talbot Town CouncilAva DaviesLS1 1URLeedsUKava.davies@example.com148 Jul 2022
15Sunshine NurseryGrace EvansBS1 4DJBristolUKgrace.evans@example.com308 Jul 2022
16Wolf Brewing CoLiam EvansM1 1AEManchesterUKliam.evans@example.com301 Sep 2022
17Newman OpticiansAva Evans02108BostonUSAava.evans@example.com1410 May 2021
18Cook Dental PracticeMia Taylor80202DenverUSAmia.taylor@example.com141 Jun 2020
19Richter RealtyLucas Walker02108BostonUSAlucas.walker@example.com305 Mar 2024
20Bloom Garden CentreLiam ClarkEC1A 1BBLondonUKliam.clark@example.com1410 Feb 2019
21Vogt JoineryEmma EvansLS1 1URLeedsUK3030 Jun 2024
22Baker Dance SchoolAva EvansLS1 1URLeedsUKava.evans@example.com3024 Jun 2021
23Cathedral PharmacyNoah WalkerBS1 4DJBristolUKnoah.walker@example.com3025 Mar 2023
24Meyer PhysioLucas TaylorLS1 1URLeedsUKlucas.taylor@example.com1410 May 2022
Activities 70 rows, 7 columns
ActivityIDCustomerIDActivityDateActivityTypeNotesFollowUpDone
131 Feb 2025CallWorkshop date agreed2 Mar 2025☑
222 Feb 2025CallWorkshop date agreed☐
31128 Feb 2025CallSupport case discussed18 Mar 2025☑
477 Mar 2025EmailQuote sent☐
51612 Mar 2025CallWorkshop date agreed2 Apr 2025☑
62111 Apr 2025CallQuestion about invoice12 May 2025☐
71012 Apr 2025CallWorkshop date agreed☐
81625 Apr 2025EmailDocuments sent19 May 2025☑
9181 May 2025MeetingAnnual review30 May 2025☑
10143 May 2025EmailQuote sent☐
11245 May 2025CallInterested in training2 Jun 2025☑
1265 May 2025CallInterested in training25 May 2025☑
131924 May 2025CallSupport case discussed☐
1433 Jun 2025CallQuestion about invoice☐
152021 Jun 2025MeetingWorkshop prepared16 Jul 2025☑
161823 Jul 2025CallSupport case discussed☐
17427 Jul 2025EmailFeedback on quote16 Aug 2025☑
1841 Aug 2025CallSupport case discussed28 Aug 2025☑
19231 Aug 2025CallQuestion about invoice30 Aug 2025☑
20312 Aug 2025CallSupport case discussed4 Sep 2025☑
212110 Sep 2025CallQuestion about invoice☐
221115 Sep 2025MeetingSupport plan presented23 Sep 2025☑
231018 Sep 2025CallSupport case discussed17 Oct 2025☑
24721 Oct 2025CallInterested in training☐
25217 Nov 2025EmailQuote sent21 Nov 2025☑
26189 Nov 2025MeetingAnnual review27 Nov 2025☑
27212 Nov 2025MeetingAnnual review☐
28514 Nov 2025CallQuestion about invoice☐
29313 Jan 2026MeetingWorkshop prepared☐
301313 Jan 2026MeetingAnnual review24 Jan 2026☑
31116 Jan 2026EmailFeedback on quote☐
32219 Feb 2026EmailQuote sent☐
332213 Feb 2026CallInterested in training27 Feb 2026☑
341219 Feb 2026MeetingAnnual review4 Mar 2026☑
35620 Feb 2026EmailQuote sent2 Mar 2026☑
361628 Feb 2026EmailDocuments sent☐
3727 Mar 2026CallQuestion about invoice☐
38623 Mar 2026MeetingWorkshop prepared22 Apr 2026☑
39172 May 2026MeetingWorkshop prepared1 Jun 2026☐
40615 May 2026CallQuestion about invoice7 Jun 2026☐
411717 May 2026CallWorkshop date agreed19 Jun 2026☑
42621 May 2026EmailQuote sent9 Jun 2026☑
4329 Jun 2026MeetingSupport plan presented☐
442220 Jun 2026EmailDocuments sent27 Jun 2026☐
45228 Jun 2026MeetingWorkshop prepared15 Jul 2026☑
46329 Jun 2026MeetingSupport plan presented14 Jul 2026☑
47107 Jul 2026MeetingAnnual review☐
48168 Jul 2026MeetingWorkshop prepared☐
491214 Jul 2026MeetingWorkshop prepared☐
502221 Jul 2026CallInterested in training☐
511621 Jul 2026EmailDocuments sent☐
52727 Jul 2026MeetingWorkshop prepared☐
53182 Aug 2026CallWorkshop date agreed14 Aug 2026☑
54213 Aug 2026CallWorkshop date agreed☐
551414 Aug 2026MeetingAnnual review☐
56321 Aug 2026CallQuestion about invoice☐
572130 Aug 2026CallSupport case discussed☐
5884 Sep 2026CallSupport case discussed9 Oct 2026☑
59610 Sep 2026CallWorkshop date agreed24 Sep 2026☑
601014 Sep 2026CallSupport case discussed☐
61314 Sep 2026EmailDocuments sent23 Sep 2026☑
622119 Sep 2026EmailQuote sent☐
632429 Sep 2026CallInterested in training☐
64215 Oct 2026CallWorkshop date agreed☐
651117 Oct 2026EmailFeedback on quote24 Oct 2026☐
661622 Oct 2026CallQuestion about invoice26 Nov 2026☐
672013 Nov 2026MeetingWorkshop prepared☐
68322 Nov 2026CallInterested in training3 Dec 2026☐
69224 Nov 2026CallQuestion about invoice☐
701926 Nov 2026EmailQuote sent15 Dec 2026☐

This exercise is part of Premium.

Premium unlocks every exercise in every lesson, unlimited practice with fresh tasks and the final test with certificate.

See Premium Already Premium? Log in

The first exercise in this lesson is free.

The lesson on totals queries explains the Total row with Max and Min.

Task 3: customers without activity since June

Task Which customers have had no activity since 1 Jun 2026? Show Company and City, sorted by Company. Customers without any activity belong in the list. Write the query in SQL view.

Customers 24 rows, 9 columns
CustomerIDCompanyContactNamePostalCodeCityCountryEmailPaymentTermsCustomerSince
1Bauer Plumbing LtdHenry Davies80202DenverUSAhenry.davies@example.com1416 Sep 2020
2Northlight PublishingJames WalkerEC1A 1BBLondonUKjames.walker@example.com3014 May 2024
3Shaw & Partners AccountantsAva Brown02108BostonUSAava.brown@example.com3013 Sep 2020
4Summit Consulting IncGrace TaylorM1 1AEManchesterUKgrace.taylor@example.com3023 Nov 2020
5City UtilitiesMia Evans02108BostonUSA3025 Jun 2024
6Market Street ClinicOlivia SmithEC1A 1BBLondonUKolivia.smith@example.com3014 Jun 2019
7Roth Legal LLPNoah Davies80202DenverUSAnoah.davies@example.com1425 Sep 2020
8Weber LogisticsSophia Smith02108BostonUSAsophia.smith@example.com3022 Mar 2019
9Krause BakeryAva Taylor80202DenverUSAava.taylor@example.com3010 Oct 2019
10Lindner MotorsLiam Smith80202DenverUSAliam.smith@example.com3030 Nov 2021
11Lakeview HotelAva WilsonG1 1XQGlasgowUKava.wilson@example.com305 Sep 2020
12Hansen PrintingOlivia JohnsonEC1A 1BBLondonUKolivia.johnson@example.com309 Jul 2021
13Fisher ElectricalMia ClarkBS1 4DJBristolUK3030 Aug 2023
14Talbot Town CouncilAva DaviesLS1 1URLeedsUKava.davies@example.com148 Jul 2022
15Sunshine NurseryGrace EvansBS1 4DJBristolUKgrace.evans@example.com308 Jul 2022
16Wolf Brewing CoLiam EvansM1 1AEManchesterUKliam.evans@example.com301 Sep 2022
17Newman OpticiansAva Evans02108BostonUSAava.evans@example.com1410 May 2021
18Cook Dental PracticeMia Taylor80202DenverUSAmia.taylor@example.com141 Jun 2020
19Richter RealtyLucas Walker02108BostonUSAlucas.walker@example.com305 Mar 2024
20Bloom Garden CentreLiam ClarkEC1A 1BBLondonUKliam.clark@example.com1410 Feb 2019
21Vogt JoineryEmma EvansLS1 1URLeedsUK3030 Jun 2024
22Baker Dance SchoolAva EvansLS1 1URLeedsUKava.evans@example.com3024 Jun 2021
23Cathedral PharmacyNoah WalkerBS1 4DJBristolUKnoah.walker@example.com3025 Mar 2023
24Meyer PhysioLucas TaylorLS1 1URLeedsUKlucas.taylor@example.com1410 May 2022
Activities 70 rows, 7 columns
ActivityIDCustomerIDActivityDateActivityTypeNotesFollowUpDone
131 Feb 2025CallWorkshop date agreed2 Mar 2025☑
222 Feb 2025CallWorkshop date agreed☐
31128 Feb 2025CallSupport case discussed18 Mar 2025☑
477 Mar 2025EmailQuote sent☐
51612 Mar 2025CallWorkshop date agreed2 Apr 2025☑
62111 Apr 2025CallQuestion about invoice12 May 2025☐
71012 Apr 2025CallWorkshop date agreed☐
81625 Apr 2025EmailDocuments sent19 May 2025☑
9181 May 2025MeetingAnnual review30 May 2025☑
10143 May 2025EmailQuote sent☐
11245 May 2025CallInterested in training2 Jun 2025☑
1265 May 2025CallInterested in training25 May 2025☑
131924 May 2025CallSupport case discussed☐
1433 Jun 2025CallQuestion about invoice☐
152021 Jun 2025MeetingWorkshop prepared16 Jul 2025☑
161823 Jul 2025CallSupport case discussed☐
17427 Jul 2025EmailFeedback on quote16 Aug 2025☑
1841 Aug 2025CallSupport case discussed28 Aug 2025☑
19231 Aug 2025CallQuestion about invoice30 Aug 2025☑
20312 Aug 2025CallSupport case discussed4 Sep 2025☑
212110 Sep 2025CallQuestion about invoice☐
221115 Sep 2025MeetingSupport plan presented23 Sep 2025☑
231018 Sep 2025CallSupport case discussed17 Oct 2025☑
24721 Oct 2025CallInterested in training☐
25217 Nov 2025EmailQuote sent21 Nov 2025☑
26189 Nov 2025MeetingAnnual review27 Nov 2025☑
27212 Nov 2025MeetingAnnual review☐
28514 Nov 2025CallQuestion about invoice☐
29313 Jan 2026MeetingWorkshop prepared☐
301313 Jan 2026MeetingAnnual review24 Jan 2026☑
31116 Jan 2026EmailFeedback on quote☐
32219 Feb 2026EmailQuote sent☐
332213 Feb 2026CallInterested in training27 Feb 2026☑
341219 Feb 2026MeetingAnnual review4 Mar 2026☑
35620 Feb 2026EmailQuote sent2 Mar 2026☑
361628 Feb 2026EmailDocuments sent☐
3727 Mar 2026CallQuestion about invoice☐
38623 Mar 2026MeetingWorkshop prepared22 Apr 2026☑
39172 May 2026MeetingWorkshop prepared1 Jun 2026☐
40615 May 2026CallQuestion about invoice7 Jun 2026☐
411717 May 2026CallWorkshop date agreed19 Jun 2026☑
42621 May 2026EmailQuote sent9 Jun 2026☑
4329 Jun 2026MeetingSupport plan presented☐
442220 Jun 2026EmailDocuments sent27 Jun 2026☐
45228 Jun 2026MeetingWorkshop prepared15 Jul 2026☑
46329 Jun 2026MeetingSupport plan presented14 Jul 2026☑
47107 Jul 2026MeetingAnnual review☐
48168 Jul 2026MeetingWorkshop prepared☐
491214 Jul 2026MeetingWorkshop prepared☐
502221 Jul 2026CallInterested in training☐
511621 Jul 2026EmailDocuments sent☐
52727 Jul 2026MeetingWorkshop prepared☐
53182 Aug 2026CallWorkshop date agreed14 Aug 2026☑
54213 Aug 2026CallWorkshop date agreed☐
551414 Aug 2026MeetingAnnual review☐
56321 Aug 2026CallQuestion about invoice☐
572130 Aug 2026CallSupport case discussed☐
5884 Sep 2026CallSupport case discussed9 Oct 2026☑
59610 Sep 2026CallWorkshop date agreed24 Sep 2026☑
601014 Sep 2026CallSupport case discussed☐
61314 Sep 2026EmailDocuments sent23 Sep 2026☑
622119 Sep 2026EmailQuote sent☐
632429 Sep 2026CallInterested in training☐
64215 Oct 2026CallWorkshop date agreed☐
651117 Oct 2026EmailFeedback on quote24 Oct 2026☐
661622 Oct 2026CallQuestion about invoice26 Nov 2026☐
672013 Nov 2026MeetingWorkshop prepared☐
68322 Nov 2026CallInterested in training3 Dec 2026☐
69224 Nov 2026CallQuestion about invoice☐
701926 Nov 2026EmailQuote sent15 Dec 2026☐

This exercise is part of Premium.

Premium unlocks every exercise in every lesson, unlimited practice with fresh tasks and the final test with certificate.

See Premium Already Premium? Log in

The first exercise in this lesson is free.

The lesson on subqueries shows NOT IN with a subquery.

Common mistakes

Done follow-ups counted

Without the criterion under Done, every activity with a date shows up, including the one from spring that was dealt with long ago. The list gets long and nobody works through it.

Date before June instead of no date from June

WHERE ActivityDate < #6/1/2026# returns customers with an activity before June, even if another came later. What you want is the absence of a later activity, and that only works with NOT IN (or NOT EXISTS).

In real Access

  • For daily work, make the query from task 1 the start form, sorted by follow-up date. Instead of the fixed date it uses Date(), which is today.
  • A continuous form with a Done check box turns the query into a to-do list: tick it and the row is gone the next time you open it.
  • Many CRM databases also store who had the contact. Then the query shows each person only their own follow-ups.

How to check your result

  • Task 1: 6 follow-ups, the oldest from 12 May 2025 at Vogt Joinery, the latest from 26 Nov 2026 at Wolf Brewing Co.
  • Task 2: 22 companies; the longest ago is the last activity with Summit Consulting Inc and Cathedral Pharmacy (1 Aug 2025). Two customers are missing because they have no activity at all.
  • Task 3: 8 customers from Bauer Plumbing Ltd to Sunshine Nursery, including Krause Bakery and Sunshine Nursery, who have no activity at all.

Next: case 3, Creating invoices

Calculate net and gross per line and build the customer card with a subform.

Go to case 3

Back to the course overview.

Write to us

Choose language

Select your preferred language