Please help me solve this question and guide me through the assignment
Assignment : Reverse Index in SQL
In this assignment, you will create a table of documents and then produce a reverse index for those documents that identifies each document which contains a particular word using SQL.
This is the SQL given to create the table and index;
CREATE TABLE docs01 (id SERIAL, doc TEXT, PRIMARY KEY(id));
CREATE TABLE invert01 ( keyword TEXT, doc_id INTEGER REFERENCES docs01(id) ON DELETE CASCADE );
Data to be inserted into the table ;
INSERT INTO docs01 (doc) VALUES ('or recompiling the code to create a machine language version of the'), ('program for the new machine'), ('These programming language translators fall into two general categories'), ('An interpreter reads the source code of the program as'), ('written by the programmer parses the source code and interprets the'), ('instructions on the fly Python is an interpreter and when we are'), ('running Python interactively we can type a line of Python a sentence'), ('and Python processes it immediately and is ready for us to type another'), ('Some of the lines of Python tell Python that you want it to remember'), ('some value for later We need to pick a name for that value to be');
The output should look like this as the pic
Please guide me through the assignment. I also upload the sql code that I did but I get the wrong answer.
This the SQL command that I did, as you can see the output that I get is wrong, please tell me where my code is wrong and I also try to update the SELECT statement but I get "syntax error".
Please guide me through the assignment to get the output as requested by the Assignment.