Question

Write a query that will return the first name, last name, housing status and family status...

Write a query that will return the first name, last name, housing status and family status from the Person and PersonDemographics tables. Note that there may be missing data in some of the fields due to this being a ‘live’ database that was developed over time. If you like, you can fill in some of the missing demographics information, if that will help you in your project.

The Volunteers work for:

  • Food Shelf
  • Administration
  • Housing
  • Outreach
  • Fund Raising

Job functions by Organization:

  • Food Shelf: Intake Worker, Warehouse worker, Inventory, Vendor Management
  • Administration: Administrative Assistant, Financial Assistant
  • Housing: Coordinator, Client Outreach
  • Outreach: Media Relations, Marketing Assistant
  • Fundraising: Charity Outreach, Fundraiser, Event Coordinator, Event Volunteer
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Count number of rows is null
select count(*) from Person p where p.firstname is null;
select count(*) from Person p where p.lastname is null;


select p.firstname, p.lastname, pd.housingstatus, pd.familystatus from Person p, PersonDemographics pd
where p.firstname is not null and p.lastname is not null and pd.housingstatus is not null and pd.familystatus is not null
and p.firstname = pd.firstname and p.lastname = pd.lastname groupby pd.familstatus;

Add a comment
Know the answer?
Add Answer to:
Write a query that will return the first name, last name, housing status and family status...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Playgrounds and Performance: Results Management at KaBOOM! (A) We do this work because we want to...

    Playgrounds and Performance: Results Management at KaBOOM! (A) We do this work because we want to make a difference in the world; how can we go further faster? - Darell Hammond, CEO and co-founder, KaBOOM! Darell Hammond stepped onto the elementary school playground and took a long, slow look around. It was 8 a.m. on an unusually warm fall day in 2002 and the playground was deserted, but Hammond knew the children would start arriving soon to admire their new...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT