7 use DBIC::SqlMakerTest;
9 my $schema = DBICTest->init_schema();
11 my $rs = $schema->resultset('CD')->search({}, {
15 count => 'tracks.track_id',
23 SELECT me.cdid, me.artist, me.title, me.year, me.genreid, me.single_track FROM cd me
24 GROUP BY me.cdid, me.artist, me.title, me.year, me.genreid, me.single_track
25 ORDER BY COUNT(tracks.trackid) DESC
29 todo_skip 'order_by using function', 2;
30 is_same_sql($rs->as_query, $match, 'order by with func query');
32 ok($rs->count == 2, 'amount of rows return in order by func query');