diff --git a/modules/Bio/EnsEMBL/Pipeline/Production/SnpCount.pm b/modules/Bio/EnsEMBL/Pipeline/Production/SnpCount.pm
index 642f26933e8eaf6fc630fd58ee8047b838244f69..1a9d9cd1e30f9bf19adea23b06d3136beb02ae49 100644
--- a/modules/Bio/EnsEMBL/Pipeline/Production/SnpCount.pm
+++ b/modules/Bio/EnsEMBL/Pipeline/Production/SnpCount.pm
@@ -38,7 +38,7 @@ sub get_attrib_codes {
   my $prod_dba   = $self->get_production_DBAdaptor();
   my $prod_helper     = $prod_dba->dbc()->sql_helper();
   my $sql = q{
-    SELECT name, code
+    SELECT code, name
     FROM attrib_type
     WHERE name = 'SNP count' };
   my %attrib_codes = %{ $prod_helper->execute_into_hash(-SQL => $sql) };