SQl Query Urgent [message #280751] |
Wed, 14 November 2007 11:50 |
greentree
Messages: 1 Registered: November 2007
|
Junior Member |
|
|
name | gadget
--------+-------------
Mike | computer
Mike | keyboard
Mike | keyboard
Mike | mouse
Mike | mouse
Steve | computer
Steve | phone
Anton | computer
Anton | keyboard
Anton | mouse
Anton | TV
Alex | TV
Alex | mouse
Alex | phone
Alex | computer
Some specific name is given as the input.
Please write SQL statement(s) which returns list of names of the persons having set of unique gadgets which is equal to or greater than the person whose name was given.
Examples:
input: Mike
output: Anton
Mike has (computer, keyboard, mouse).
Anton has more gadgets: (computer, keyboard, mouse) + TV.
|
|
|
|
|
|