I'm having to hack a report together to pull data from another field in the same table. The row selection is going to be based on various elements in the above 'foreignkey' field - elements 1, 2, 4 & ...
CREATE TABLE books ( book_id INT NOT NULL AUTO_INCREMENT, title VARCHAR(100), author_fname VARCHAR(100), author_lname VARCHAR(100), released_year INT, stock_quantity INT, pages INT, PRIMARY ...
-- Q1 get the payment ID, Staff ID, rental ID and amount only for that payment where the rental ID is greater than rental ID of payment ID = 4 ...