I *think* this would work for number 2...
$DB->table('Links', 'Reviews')->count;
It will use the foreign key to do the count and so should return the number of links with reviews.
Alternatively this should work....
my $total = $DB->table('Reviews')->('DISTINCT(Review_LinkID)')->fetchall_list;
$DB->table('Links', 'Reviews')->count;
It will use the foreign key to do the count and so should return the number of links with reviews.
Alternatively this should work....
my $total = $DB->table('Reviews')->('DISTINCT(Review_LinkID)')->fetchall_list;