All pastes #77831 Raw Edit

Miscellany

public sql v1 · immutable
·published 2006-07-03 13:14 UTC
rendered paste body
SELECT shop_warenkorb.id as id, shop_produkte.prod_bezeichnung as prod_bezeichnung, shop_produkte.prod_preis as prod_preis, shop_produkte.prod_mwst as prod_mwst, shop_warenkorb.cart_prod_anzahl as cart_prod_anzahl, (shop_produkte.prod_preis * shop_warenkorb.cart_prod_anzahl) AS prod_gesamnt_preis, sum( shop_produkte.prod_preis * shop_warenkorb.cart_prod_anzahl ) AS warenkorb_preis FROM shop_warenkorb RIGHT JOIN shop_produkte ON shop_warenkorb.prod_id = shop_produkte.id WHERE (shop_warenkorb.cart_id =1) GROUP BY shop_warenkorb.prod_id;