Long methods are generally considered bad, however in my code I have some hard-to-understand long methods (more than 50 lines). I have trouble making those methods easier to read because a single statement inside is already more than 50 lines long, and that hard-to-read single statement is to build a database query using an ORM to do some specific job where the job done is clearly indicated on the method name. The reason that the statement is so long because it joins on multiple columns, applies multiple wheres and selects multiple distinct columns to make a required documented output format.
Is such hard-to-read code considered bad code? Similarly, if I write code for a complicated algorithm resulting in hard-to-read code wrapped in a clearly-named method, is that code bad code?