I've got to execute a self-joining sql statement on a derived table in mysql. The derived table involves a hairy subquery, and I'm wondering if there's any alternative to actually writing and executing it twice-
SELECT a.* FROM (my hairy subquery) AS a
LEFT JOIN (my hairy subquery) AS a2
ON a.groupname = a2.groupname etc..
The standard solution to this is to use CTEs, but these are not yet supported in MySQL. Alternatives are:
Related
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With