Your table names are wrong. note in your first query the use of $wpdb->posts
to reference the posts table.
however– this is a very simple query that can be done via the API rather than writing SQL queries from scratch. Use a new WP_Query instance instead.