Pluks and Zinks

There is a table with pluks and zinks. Each pluk only resides on a single zink and each zink may contain multiple pluks. How do you find how many pluks are on each and every zink?

Questions by medifast2

Showing Answers 1 - 4 of 4 Answers

parulkarg

  • Mar 17th, 2010
 

Assuming zink_id maintains referential integrity

SELECT b.zink_id, count(*)
FROM Plunks a, Zinks b
WHERE a.zink_id =* b.zink_id
GROUP BY  b.zink_id

Outer join ensures counts are displayed as zero if no records exists in plunks

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions