From: Justin Hunter Date: Thu, 11 Jun 2009 20:29:53 +0000 (+0000) Subject: cookbook tweak for count distinct X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8935bae328ce157ac8917317badc5d2bfdd106c7;p=dbsrgits%2FDBIx-Class-Historic.git cookbook tweak for count distinct --- diff --git a/lib/DBIx/Class/Manual/Cookbook.pod b/lib/DBIx/Class/Manual/Cookbook.pod index 574a8e1..b13b05a 100644 --- a/lib/DBIx/Class/Manual/Cookbook.pod +++ b/lib/DBIx/Class/Manual/Cookbook.pod @@ -279,7 +279,7 @@ any of your aliases using either of these: my $count = $rs->count; # Equivalent SQL: - # SELECT COUNT( DISTINCT( me.name ) ) FROM artist me + # SELECT COUNT( * ) FROM (SELECT me.name FROM artist me GROUP BY me.name) count_subq: =head2 Grouping results