Advertisement
Guest User

Untitled

a guest
Nov 25th, 2014
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. table: Communication
  2. communication_id int
  3. customer_id int
  4. created datetime
  5.  
  6. SELECT *
  7. FROM Customer cu
  8. INNER JOIN Communication co ON cu.customer_id = co.customer_id
  9. LEFT JOIN File f ON f.communication_id = co.communication_id
  10. LEFT JOIN Message m ON m.communication_id = co.communication_id
  11. ORDER BY cu.customer_id, co.communication_id
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement