writing inner join in wpdb

thanks for your time and thanks to @czerspalace
I started the query with double quotation and then separate it with a single quotation and after looking at the echo output I found that there’s no spaces between From and table name

this is the correct way

$pending_reservations = $wpdb->get_results(' 
    SELECT booking_calendars.cal_name
    FROM '.$wpdb->prefix.'booking_calendars AS booking_calendars
    INNER JOIN '. $wpdb->prefix.'booking_reservation AS booking_reservations
    ON booking_calendars.id =  booking_reservations.calendar_id
    WHERE status LIKE "pending"');