[nmglug] query masters??

Andres Paglayan andres at paglayan.com
Fri Mar 4 13:48:38 PST 2011


Hey,

I need a query for the following,

given a table with this vales

| id | parent_id | question_id |
| 1  |  1             | 1                  |
| 2  |  1             | 1                  |
| 3  |  1             | 2                  |
| 4  |  1             | 2                  |


Knowing only that I am searching for the parent_id = 1
I need a query that searches for
parent_id = 1 and then for each matching record, the older entry,
meaning the result should only have the records with id 2 and 4,

any hint?



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nmglug.org/pipermail/nmglug-nmglug.org/attachments/20110304/6490eb24/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5510 bytes
Desc: not available
URL: <http://lists.nmglug.org/pipermail/nmglug-nmglug.org/attachments/20110304/6490eb24/attachment.bin>


More information about the nmglug mailing list