SQL SELECT name, yrgoal, contamt 2 FROM donor, donation 3 WHERE donor.idno = donation.idno AND contamt > yrgoal/12; Donor table IDNO NAME STADR CITY ST ZIP DATEFST YRGOAL CONTACT 11111 Stephen Daniels 123 Elm St 24 Benefit St 24 Benefit St 21 Main St 26 Oak St 36 Pine St Seekonk Providence RI 02045 24-MAY-97 Providence RI 02045 03-JAN-98 Fall River MA 02720 04-MAR-92 Fall River MA 02720 04-MAR-92 Fall River MA 02720 04-APR-98 MA 02345 03-JUL-98 500 John Smith 12121 Jennifer Ames 400 Susan Jones 22222 Carl Hersey Susan Jones 23456 Susan Ash 33333 Nancy Taylor 100 Amy Costa 50 John Adams 34567 Robert Brooks 50 Amy Costa Donation table (note that dri is actually driveno) IDNO DRI CONTDATE CONTAMT 11111 100 07-JAN-99 11111 200 12-JUN-99 12121 200 23-FEB-99 12121 100 04-JUN-99 22222 100 14-MAR-99 23456 100 03-MAR-99 23456 300 14-JUN-99 33333 300 10-MAR-99 25 35 40 50 10 20 10 10 Drive table (note that dri is actually driveno) DRI DRIVENAME DRIVECHAIR LASTYEAR THISYEAR 100 Kids Shelter 200 Animal Home 300 Health Aid Ann Smith Linda Grant David Ross 10000 5000 7000 100 Half Nau Dohont Do
SQL SELECT name, yrgoal, contamt 2 FROM donor, donation 3 WHERE donor.idno = donation.idno AND contamt > yrgoal/12; Donor table IDNO NAME STADR CITY ST ZIP DATEFST YRGOAL CONTACT 11111 Stephen Daniels 123 Elm St 24 Benefit St 24 Benefit St 21 Main St 26 Oak St 36 Pine St Seekonk Providence RI 02045 24-MAY-97 Providence RI 02045 03-JAN-98 Fall River MA 02720 04-MAR-92 Fall River MA 02720 04-MAR-92 Fall River MA 02720 04-APR-98 MA 02345 03-JUL-98 500 John Smith 12121 Jennifer Ames 400 Susan Jones 22222 Carl Hersey Susan Jones 23456 Susan Ash 33333 Nancy Taylor 100 Amy Costa 50 John Adams 34567 Robert Brooks 50 Amy Costa Donation table (note that dri is actually driveno) IDNO DRI CONTDATE CONTAMT 11111 100 07-JAN-99 11111 200 12-JUN-99 12121 200 23-FEB-99 12121 100 04-JUN-99 22222 100 14-MAR-99 23456 100 03-MAR-99 23456 300 14-JUN-99 33333 300 10-MAR-99 25 35 40 50 10 20 10 10 Drive table (note that dri is actually driveno) DRI DRIVENAME DRIVECHAIR LASTYEAR THISYEAR 100 Kids Shelter 200 Animal Home 300 Health Aid Ann Smith Linda Grant David Ross 10000 5000 7000 100 Half Nau Dohont Do
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Please help me! clarify the answer

Transcribed Image Text:### SQL Table Join Example: An Educational Guide
#### Query Explanation
Below is an illustrative example of an SQL query that joins two tables — `donor` and `donation` — and retrieves specific data:
```sql
SELECT name, yrgoal, contamt
FROM donor, donation
WHERE donor.idno = donation.idno AND contamt > yrgoal/12;
```
This query selects the `name`, `yrgoal`, and `contamt` fields from the `donor` and `donation` tables where the `idno` from both tables match and the `contamt` (contribution amount) is greater than the `yrgoal` divided by 12.
#### Donor Table
- **Columns:**
- `IDNO`: Donor identification number.
- `NAME`: Donor's name.
- `STADR`: Street address.
- `CITY`: City of residence.
- `ST`: State abbreviation.
- `ZIP`: Zip code.
- `DATEFST`: Date of first donation.
- `YRGOAL`: Yearly contribution goal.
- `CONTACT`: Contact person.
Data example:
```
IDNO NAME STADR CITY ST ZIP DATEFST YRGOAL CONTACT
----- ------------------- --------------- ------------ -- ----- -------- ------- ----------------
11111 Stephen Daniels 123 Elm St Seekonk MA 02345 03-JUL-98 500 John Smith
12211 Jennifer Ames 24 Benefit St Providence RI 02045 24-MAY-97 400 Susan Jones
22222 Carl Hersey 24 Benefit St Providence RI 02045 03-JAN-98 Susan Jones
23456 Susan Ash 21 Main St Fall River MA 02720 04-MAR-92 100 Amy Costa
33333 Nancy Taylor 26 Oak St Fall River MA 02720 04-MAR-92 50 John Adams
34567 Robert Brooks 36 Pine St Fall River MA 02720 04-APR-98 50 Amy Costa
```
#### Donation Table
- **Columns:**
- `IDNO`: Identifies which donor made the donation.
- `DRI`: Drive number
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps

Recommended textbooks for you

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education

Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY