MySQL Forums
Forum List  »  German

Nicht bezahlte Beiträge ermitteln
Posted by: daniel bihler
Date: May 28, 2007 07:58AM

Tag zusammen

Ich komme nicht weiter mit meiner momentanen Query

SELECT CONCAT_WS(' - zuletzt bezahlt am - ', CONCAT_WS(' ', client.nname, client.vname), DATE_FORMAT(date, '%d.%m.%Y')) FROM bookings AS book, clients AS client WHERE book.date <= DATE_SUB( CURDATE(), INTERVAL 12 MONTH) AND book.client_id = client.id

Bislang wird mir angezeigt wer innerhalb der letzten 12 Monate seinen Beitrag nicht bezahlt hat.
Jetzt möchte ich die Query noch insoweit ausbauen daß mir auch angezeigt wird wer noch überhaupt nix bezahlt hat.
Sprich hizugefügt werden müssten auch alle deren client.id überhaupt nicht in der Tabelle bookings als book.client_id vorkommt.

Vielen Dank im Voraus für jegliche Hilfe

Daniel

Options: ReplyQuote


Subject
Views
Written By
Posted
Nicht bezahlte Beiträge ermitteln
3300
May 28, 2007 07:58AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.