#!/usr/bin/perl
use strict;
use warnings;
use DBI;
use Data::Dumper;
# Connect to the database, (the directory containing our csv file(s))
my $dbh = DBI->connect("DBI:CSV:f_dir=.;csv_eol=\n;");
# Associate our csv file with the table name 'results'
$dbh->{'csv_tables'}->{'results'} = { 'file' => "psinfooutputdiskfile.
+csv"};
my @rows = $dbh->selectall_arrayref("SELECT IP FROM results GROUP BY I
+P");
print Dumper @rows;
Fails. If I take the GROUP BY off, everything is OK. Same with the SUM statements.
"SELECT IP FROM results" works
"SELECT IP FROM results GROUP BY IP" and "SELECT SUM(PartitionSize), SUM(PartitionFree) FROM results" fail.