in reply to Query rewriting question
Because you are doing a SELECT MIN() operation it is almost a guarantee that you cannot write this as a single query.
MySQL 4 offers some hope, though, with transactions. You could create a temporary table, fill it using the SELECT MIN() operation, and then LEFT JOIN that into your main query, finally delete the table and lastly ROLLBACK the transaction.
Either way it is going to get ugly! Good luck!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Query rewriting question
by dragonchild (Archbishop) on Oct 19, 2005 at 13:29 UTC |