System error

error:  DBD::mysql::db selectall_arrayref failed: Table 'bitcoin.averages' doesn't exist at /home/bitcoinpile/www/analytics.html line 56.
context: 
... 
52:  my $avg_volume = 0;
53:  #--------------------------------------------------------------------------------------------------------------#
54:  my $dbh = DBI->connect("DBI:mysql:database=bitcoin;host=localhost", "root", "xapian64", {'RaiseError' => 1});
55:  #--------------------------------------------------------------------------------------------------------------#
56:  my $all = $dbh->selectall_arrayref("SELECT CAST(AVG(price) AS DECIMAL(10,0)) total FROM bitcoin.averages WHERE dt >= (NOW() - INTERVAL $AVG DAY);");
57:  foreach my $row (@$all) { my ($total) = @$row; $AVERAGE = $total; }
58:  #--------------------------------------------------------------------------------------------------------------#
59:  $all = $dbh->selectall_arrayref("SELECT CAST(AVG(volume) AS DECIMAL(10,0)) total FROM bitcoin.volume WHERE dt >= (NOW() - INTERVAL $AVG DAY);");
60:  foreach my $row (@$all) { my ($total) = @$row; $avg_volume = $total; }
... 
code stack:  /home/bitcoinpile/www/analytics.html:56
raw error






























DBD::mysql::db selectall_arrayref failed: Table 'bitcoin.averages' doesn't exist at /home/bitcoinpile/www/analytics.html line 56.


Trace begun at /usr/local/share/perl/5.30.0/HTML/Mason/Exceptions.pm line 125
HTML::Mason::Exceptions::rethrow_exception('DBD::mysql::db selectall_arrayref failed: Table \'bitcoin.averages\' doesn\'t exist at /home/bitcoinpile/www/analytics.html line 56.^J') called at /home/bitcoinpile/www/analytics.html line 56
HTML::Mason::Commands::__ANON__('avg', 112) called at /usr/local/share/perl/5.30.0/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x555e6e9992d8)', 'avg', 112) called at /usr/local/share/perl/5.30.0/HTML/Mason/Request.pm line 1300
eval {...} at /usr/local/share/perl/5.30.0/HTML/Mason/Request.pm line 1292
HTML::Mason::Request::comp(undef, undef, undef, 'avg', 112) called at /usr/local/share/perl/5.30.0/HTML/Mason/Request.pm line 481
eval {...} at /usr/local/share/perl/5.30.0/HTML/Mason/Request.pm line 481
eval {...} at /usr/local/share/perl/5.30.0/HTML/Mason/Request.pm line 433
HTML::Mason::Request::exec('HTML::Mason::Request::ApacheHandler=HASH(0x555e6e6d1ab0)') called at /usr/local/share/perl/5.30.0/HTML/Mason/ApacheHandler.pm line 168
HTML::Mason::Request::ApacheHandler::exec('HTML::Mason::Request::ApacheHandler=HASH(0x555e6e6d1ab0)') called at /usr/local/share/perl/5.30.0/HTML/Mason/ApacheHandler.pm line 825
HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0x555e6e501898)', 'Apache2::RequestRec=SCALAR(0x555e6db289c8)') called at (eval 27) line 8
HTML::Mason::ApacheHandler::handler('HTML::Mason::ApacheHandler', 'Apache2::RequestRec=SCALAR(0x555e6db289c8)') called at -e line 0
eval {...} at -e line 0