I have 3 tables:
create table user (
user_id integer primary key autoincrement,
username string not null,
email string not null,
pw_hash string not null
);
create table product (
product_id integer primary key autoincrement,
productname string not null,
productdescription string not null,
);
create product_review (
product_id integer,
user_id integer,
review,
);
Now, I want to display all the reviews from user_id=1. A simple query for this would be
select * from product_review where user_id = 1
However, I want the data listed as –>
username productname review
John iPad3 Super awesome
John SonyVaio Even more awesome
Try this: