wpdb getting avatars and author url

You just need to return the user ID in the main select and use that as the author ID. Also I probably confused the issue previously by using echo with commas (separate arguments) rather than dots (one concatenated argument).

$weekly = $wpdb->get_results ( "
                       SELECT u.ID,
                        ( SELECT
                          CONCAT_WS('.',
                            SUM(CASE WHEN p.post_date > '$date2' THEN pm.meta_value ELSE 0 END),
                            SUM(pm.meta_value))
                          FROM wp_posts p, wp_postmeta pm
                          WHERE p.post_author = u.ID
                          AND p.post_status LIKE 'publish'
                          AND pm.meta_key = 'epicredvote'
                          AND p.ID = pm.post_id ) as votes
                          FROM wp_users u
                          ORDER BY votes+0 DESC LIMIT 0,5
                    " );
foreach ($weekly as $author) {
    list( $weekly_vote, $total_vote ) = explode( '.', $author->votes ? $author->votes : '0.0' );
    echo '<a href="' . get_author_posts_url( $author->ID ) . '">' . get_the_author_meta( 'user_nicename' , $author->ID ) . ' ' . get_avatar( $author->ID , 40 ) . ' </a> '
        . ' Weekly Karma: ' . $weekly_vote . '<br>' . ' Total Karma: ' . $total_vote . '<br><br><br>';
}