Guest User

Untitled

a guest
Apr 17th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.68 KB | None | 0 0
  1. SELECT Patienten . * , GROUP_CONCAT( IF( CerebrovaskulaereEreignisse.PatNr = Patienten.PatNr, CerebrovaskulaereEreignisse.MTA, NULL ) ) AS 'MTA', GROUP_CONCAT( IF( CerebrovaskulaereEreignisse.PatNr = Patienten.PatNr, CerebrovaskulaereEreignisse.EventDate, NULL ) ) AS 'EventDate'
  2. FROM Patienten
  3. JOIN CerebrovaskulaereEreignisse ON Patienten.PatNr = CerebrovaskulaereEreignisse.PatNr
  4. GROUP BY Patienten.PatNr
  5. LIMIT 0 , 30
  6.  
  7. results in:
  8. PatNr   BirthDate   Begin       Status  Sex     MTA         EventDate
  9. 1   1940-04-29  2001-09-10  1   2   [BLOB - 1B] 2003-09-01
  10. 4   1948-01-24  2002-01-29  1   2   [BLOB - 7B] 2008-10-21,2008-04-23,2007-03-05,2007-10-31
  11. 6   1969-02-02  2001-02-13  1   1   [BLOB - 1B] 2007-06-01
Add Comment
Please, Sign In to add comment