insert into donation(volunteer_id, charity_id, donation_amount) values(\"America
ID: 3873791 • Letter: I
Question
insert into donation(volunteer_id, charity_id, donation_amount) values("American Red Cross",1,1000);
insert into donation(volunteer_id, charity_id, donation_amount) values("American Cancer Society",2, 500);
insert into donation(volunteer_id, charity_id, donation_amount) values("Puppies Behind Bards",3, 750);
insert into donation(volunteer_id, charity_id, donation_amount) values("American Red Cross",1, 500);
insert into donation(volunteer_id, charity_id, donation_amount) values("St. Judes Childrens Hospital",4, 500);
Explanation / Answer
select v.first_name, d.donation_amount
from volunteer v, donation d
where v.volunteer_id=d.volunteer_id.
selecting first name i.e we want volunteer name and donation amount.
Both are in 2 tables i.e volunteer and donation tables.
common point between 2 tables in volunteer id. so the condition is they should be equal.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.