How can I include permalinks in this code?

You can eventually add ID in $sql, then it will be easier to use get_permalink function in the foreach :

<?php
global $wpdb;

$sql = "SELECT ID, post_title, meta_value
FROM $wpdb->posts a
JOIN $wpdb->postmeta b ON a.ID = b.post_id
WHERE a.post_type="page"
AND a.post_status="publish"
AND b.meta_key = '_wp_page_template'
ORDER BY a.post_title ASC
";

$results = $wpdb->get_results( $sql );
if( !empty( $results ) ) {
echo '<ul>';
foreach ( $results as $result ) {
        echo '<li><a href="'.get_permalink($result->ID).'">'. $result->post_title . ': ' . $result->meta_value. '</a></li>';}
echo '</ul>';
}
?>

deneme bonusudeneme bonusu veren sitelerpulibet girişOnwin Güncel Giriştürkçe altyazılı pornocanlı bahis casino