Skip to content

Left/Right join with a subquery doesn't work #74

Open
@Arnex93

Description

@Arnex93

Hello,

Here is my query :

SELECT a.* FROM a
    LEFT JOIN (
        SELECT b.id, b.name
        FROM b
        ORDER BY b.date_created DESC
        LIMIT 1
   ) c
ON c.id = a.iduser

and Magic Query removes the "JOIN" keyword (not for a simple JOIN), here is the result:

SELECT `a`.* FROM `a` LEFT (SELECT `b`.`id`, `b`.`name` FROM `b` ORDER BY `b`.`date_created` DESC LIMIT 1) `c` ON ( `c`.`id` = `a`.`iduser`)

Any idea how to solve this issue ?

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions