#!/usr/bin/perl use strict; use warnings; use Local::DBIC_Schema; my $schema = Local::DBIC_Schema->connect( 'DBI:SQLite:pktm' ); $schema->storage->debug(1); my $thread = $schema->resultset( 'T' )->search( { 'testid' => 1 }, { join => 'Ps', '+select' => 'Ps.timestamp', '+as' => 'timestamp', order_by => 'Ps.timestamp DESC', } )->first; print $thread->get_column( 'timestamp' );