-- Language PostgreSQL
        -- Tables: 
             -- Table: actor 
columns : [['actor id', 'number'], ['first name', 'text'], ['last name', 'text'], ['last update', 'time']]

 -- Table: address 
columns : [['address id', 'number'], ['address', 'text'], ['address2', 'text'], ['district', 'text'], ['city id', 'number'], ['postal code', 'text'], ['phone', 'text'], ['last update', 'time']]

 -- Table: category 
columns : [['category id', 'number'], ['name', 'text'], ['last update', 'time']]

 -- Table: city 
columns : [['city id', 'number'], ['city', 'text'], ['country id', 'number'], ['last update', 'time']]

 -- Table: country 
columns : [['country id', 'number'], ['country', 'text'], ['last update', 'time']]

 -- Table: customer 
columns : [['customer id', 'number'], ['store id', 'number'], ['first name', 'text'], ['last name', 'text'], ['email', 'text'], ['address id', 'number'], ['active', 'boolean'], ['create date', 'time'], ['last update', 'time']]

 -- Table: film 
columns : [['film id', 'number'], ['title', 'text'], ['description', 'text'], ['release year', 'time'], ['language id', 'number'], ['original language id', 'number'], ['rental duration', 'number'], ['rental rate', 'number'], ['length', 'number'], ['replacement cost', 'number'], ['rating', 'text'], ['special features', 'text'], ['last update', 'time']]

 -- Table: film actor 
columns : [['actor id', 'number'], ['film id', 'number'], ['last update', 'time']]

 -- Table: film category 
columns : [['film id', 'number'], ['category id', 'number'], ['last update', 'time']]

 -- Table: film text 
columns : [['film id', 'number'], ['title', 'text'], ['description', 'text']]

 -- Table: inventory 
columns : [['inventory id', 'number'], ['film id', 'number'], ['store id', 'number'], ['last update', 'time']]

 -- Table: language 
columns : [['language id', 'number'], ['name', 'text'], ['last update', 'time']]

 -- Table: payment 
columns : [['payment id', 'number'], ['customer id', 'number'], ['staff id', 'number'], ['rental id', 'number'], ['amount', 'number'], ['payment date', 'time'], ['last update', 'time']]

 -- Table: rental 
columns : [['rental id', 'number'], ['rental date', 'time'], ['inventory id', 'number'], ['customer id', 'number'], ['return date', 'time'], ['staff id', 'number'], ['last update', 'time']]

 -- Table: staff 
columns : [['staff id', 'number'], ['first name', 'text'], ['last name', 'text'], ['address id', 'number'], ['picture', 'others'], ['email', 'text'], ['store id', 'number'], ['active', 'boolean'], ['username', 'text'], ['password', 'text'], ['last update', 'time']]

 -- Table: store 
columns : [['store id', 'number'], ['manager staff id', 'number'], ['address id', 'number'], ['last update', 'time']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the title and id of the film which has a rental rate of 0.99 and an inventory of below 3?
SQL: SELECT title ,  film_id FROM film WHERE rental_rate  =  0.99 INTERSECT SELECT T1.title ,  T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id  =  T2.film_id GROUP BY T1.film_id HAVING count(*)  <  3