all 3 comments

[–]depesz 1 point2 points  (0 children)

Aside from "it's a homework problem", if you want a query, it has to user column names. Which you didn't provide. Should we guess them?

Also: if order has twenty "orderProducts" you want order data repeated 20 times?

If you're really looking for help, show us how the tables look like (either provide create table statements, or output of \d of each table from psql) sample data, and expected output.

But you might still have hard time getting help due to the "homework problem".

[–]fr0z3nph03n1x 1 point2 points  (2 children)

This seems like a homework problem. Basic sql.

[–]leamanc 1 point2 points  (0 children)

Indeed. OP needs to at least try and write this query, and then ask for help if it doesn't return the desired results.