6 use DBICTest ':DiffSQL';
8 my $schema = DBICTest->init_schema();
10 my $rs = $schema->resultset('CD')->search({}, {
14 count => 'tracks.track_id',
22 SELECT me.cdid, me.artist, me.title, me.year, me.genreid, me.single_track FROM cd me
23 GROUP BY me.cdid, me.artist, me.title, me.year, me.genreid, me.single_track
24 ORDER BY COUNT(tracks.trackid) DESC
28 todo_skip 'order_by using function', 2;
29 is_same_sql($rs->as_query, $match, 'order by with func query');
31 ok($rs->count == 2, 'amount of rows return in order by func query');