Question

MySQL Query Language Please help

Find the ids of users who own at least one of every kind of observer. Note that a user can have multiple observers of the same type, and note also that new observers can be added at any time (so don’t use any constants in your query, e.g., do not assume static knowledge of the set of all possible observer kinds)

Here are the attributes:
tnum number observation_id PHLG obs observationid PHLogger address street address_state diastolic number tnum number User man

0 0
Add a comment Improve this question Transcribed image text
Answer #1

In orde4 to achieve we can use observable table which contain observer_id and corresponding kind. In observable table one observer_id have aleast one kind. If onserver_id is not available in observable table. Below is query

select Observer_id from observable group by observer_id having count(kind)>=1;

Add a comment
Know the answer?
Add Answer to:
MySQL Query Language Please help Find the ids of users who own at least one of every kind of observer. Note that a user can have multiple observers of the same type, and note also that new observers c...
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
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