laravel clickhouse join

(79条消息) 列式存储数据库ClickHouse的安装及使用Laravel连接使用_larval clickhouse_风中一匹狼2333的博客-CSDN博客
https://blog.csdn.net/qq_32404231/article/details/118930322

  $bd = DB::connection("clickhouse")->table('teacher')->as("a")
            ->leftJoin(function(\Tinderbox\ClickhouseBuilder\Query\JoinClause  $join){
                $join->table('student')
                    ->as("b")
                    ->on("a.id",'=','b.teacher_id')
                    ->on('a.course_no','=','b.course_no');
            })
            ->where('a.create_time','>=',$start_time)
            ->get();

posted @ 2023-06-07 12:16  Bashuslovakia  阅读(243)  评论(0编辑  收藏  举报