lang
1 2select t2.id,name,count(*) as toroku ,sum(case when tion_flg <> 0 THEN 1 ELSE 0 END ) as riyou,t2.upload_at 3 FROMid_master as t1 4 LEFT JOIN id_upload as t2 5 ON t1.upload_id = t2.upload_id 6 GROUP BY t2.id,t2.name,t2.upload_at 7 ORDER BY id
上記のsqlをlaravelのクエリービルだで書きたいのですが、
どう書けばよいですか
あなたの回答
tips
プレビュー