Display future posts in archive

You need to use “OR” instead of “AND”,

<?php
// Get years that have posts
$years = $wpdb->get_results( "SELECT YEAR(post_date) AS year FROM wp_posts WHERE post_type="post" AND (post_status="publish" or post_status="future") GROUP BY year DESC" );

// For each year, do the following
foreach ( $years as $year ) {

    // Get all posts for the year
    $posts_this_year = $wpdb->get_results( "SELECT * FROM wp_posts WHERE post_type="post" AND (post_status="publish" OR post_status="future") AND YEAR(post_date) = '" . $year->year . "' ORDER BY post_date DESC" );

        foreach ( $posts_this_year as $post ) {
            // echoing miscellaneous stuff
        }
}
?>