I am new in Laravel. Here below i mention my code how to make this in laravel query builder.
Using tables are ab,cd,ef,gh,ij
SELECT ab.* FROM ab WHERE ab.id IN (SELECT ab_id FROM cd WHERE ef_id = 1 AND status = 1 AND deleted_at IS NULL AND ab_id IN (SELECT ab_id FROM gh WHERE ij_id IN (SELECT id FROM ij WHERE ef_id = 1 AND deleted_at IS NULL) AND deleted_at IS NULL) AND ab_id IN (SELECT id FROM ab WHERE deleted_at IS NULL AND usertest != 1)) AND ab.deleted_at IS NULL GROUP BY ab.id ORDER BY ab.created_at DESC;
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire