Convert SQL raw sentence to Query Builder of laravel

  laravel-7, laravel-query-builder, mysql, php

Help, I want to convert this SQL query to Query builder Laravel

DB::select('SELECT * FROM (SELECT RANK() OVER (ORDER BY nombre ASC) ranking, studios.* FROM studios) studio ORDER BY ranking');

It works on the local server using DB::statement("SET SQL_MODE=”");
But on the Hosting server it does not work.

Source: Ask PHP

LEAVE A COMMENT