A visit to https://www.google.co.uk/search?q=dbix+select+distinct should answer your question:
DBIx::Class::Manual::Cookbook (first result here) says: SELECT DISTINCT with multiple columns ... my $rs = $schema->resultset('Artist')->search( {}, { columns => [ qw/artist_id name rank/ ], distinct => 1 } ); ... It *is* a little hard to find, I guess, since the word "distinct" does not appear in DBIx::Class::Manual::Features, and the explanation of *distinct* in DBIx::Class::ResultSet only mentions `GROUP BY`. You can generate the functional form by writing e.g. { ..., columns => [ { distinct => ... } ] }; On 8 March 2018 at 06:52, Andreas Dafferner < andreas.daffer...@adw.uni-heidelberg.de> wrote: > I'm quite new to DBIx and cannot find out what is the DBIx way for > > select distinct left (col, (length(col) - 9)) from table order by col > > ??? > > Thank you for any help > > Andreas > > _______________________________________________ > List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class > IRC: irc.perl.org#dbix-class > SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ > Searchable Archive: http://www.grokbase.com/group/ > dbix-class@lists.scsys.co.uk >
_______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk