MySQL Forums
Forum List  »  Newbie

Re: Optimize code
Posted by: Peter Brawley
Date: October 13, 2017 12:05AM

> Thought pastebin was pretty standard

So it might be for some, not for me though, and IAC but these fora are often polluted by trolls & spam, ad in any case sql is text.

Re your query, one approach is to create a View for the inner aggregating query, and reference it as desired.

In MySQL 8.0, you could use a CTE..



Edited 1 time(s). Last edit at 10/13/2017 12:10AM by Peter Brawley.

Options: ReplyQuote


Subject
Written By
Posted
October 12, 2017 09:07PM
October 12, 2017 11:55PM
October 13, 2017 12:02AM
Re: Optimize code
October 13, 2017 12:05AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.