Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT orderId, c.firstname, c.secondname, concat(a.street,\' \',a.city,\' \',a.postcode) as adress, c.telephone, b.title, concat(au.firstName,\' \',au.lastName) as author, b.pageCount, dateOrder FROM orders as o
- JOIN Customers as c
- ON o.userId = c.id
- JOIN Adresses as a
- on a.userId = c.id
- JOIN Books as b
- ON o.bookId = b.bookId
- JOIN AutorsBooks as a_b
- ON b.bookId = a_b.bookId
- JOIN Autors as au
- ON au.id = a_b.authorId
- ORDER BY o.orderId'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement