Specialized Query

R

robboll

I am trying to develop a query that displays 5 unless there is a 3 for
each owner in the results set. To better explain with sample data.
I have a data set as follows:

Owner Value
A 3
A 5
B 5
C 5
C 3

So when the query is run it displays:

Owner Value
A 3
B 5
C 3

Any tips appreciated!!!!

RBollinger
 
M

MGFoster

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

SELECT Owner, Min(Value)
FROM table_name
WHERE Value IN (3,5)
GROUP BY Owner
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQ+FGhYechKqOuFEgEQKwzQCg+Sb4WRN+WfLBoJKZKjyJjh+zS4IAnAiT
tZYIuU2GqCoYd66JEpkcTfT0
=TIC+
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top