Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT CUSTOMERS.CUSTOMER_ID,CUSTOMERS.FIRST_NAME,CUSTOMERS.LAST_NAME,
- SUM(PAYMENTS.PAID_AMOUNT) as TOTAL_PAYMENT, PAYMENTS.[TYPE]
- FROM PAYMENTS
- FULL OUTER JOIN CUSTOMERS ON PAYMENTS.CUSTOMER_ID=CUSTOMERS.CUSTOMER_ID
- GROUP BY CUSTOMERS.CUSTOMER_ID,CUSTOMERS.FIRST_NAME,CUSTOMERS.LAST_NAME,
- PAYMENTS.[TYPE]
- ORDER BY CUSTOMER_ID;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement