Doctrine , Symfony query builder

How can i write this Native SQL with symfony query builder

SELECT c.* FROM catalogueoutfit AS c 
              LEFT JOIN (SELECT oii.item_id,oii.outfit_id,sss.id 
                            FROM outfititems as oii 
                            LEFT JOIN catalogueitem AS cti ON cti.id = oii.item_id 
                            LEFT JOIN shops as sss ON sss.id = cti.shops_id 
                            GROUP BY sss.id,oii.outfit_id,oii.item_id 
                            HAVING sss.id  = 44 
                        ) as oi 
              ON oi.outfit_id = c.id  LIMIT 500 

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *