table : metrics
columns:
1. name : Name
2. instance: A name can have several instances
(Name: John, Instances: John at work, John at concert)
3. metric: IQ, KQ, EQ
4. metric_value: Any numeric
Objective of the query
Find out the metrics whose metric_value
is 0 for all instances for all names.
Nature of data
A name's metric 'M
' for instance 'X
' could be 10. But for the same name and the same metric instance 'Y
' could be 0
. In this case, 'M
' should NOT be returned.
Edit: Sample data:
NAME INSTANCE METRIC VALUE
John At work IQ 0
John At home EQ 10
John At a concert KQ 0
Jim At work IQ 0
Jim At home KQ 0
Tina At home IQ 100
Tina At work EQ 0
Tina At work KQ 0
In this case, only KQ should be returned since it is always zero for all Names and their instances.