my @data = $c->model("t1")->search( { "t2.num" => $a, "t3.name" => "xyz" }, { prefetch => [qw/t2 t3/], select => [qw/xyz rst/], #xyz feild is comman in t2 and t3 distinct => [qw/xyz rst/], order_by => [qw/rst/] } )->all;