P
PATRICIA
Just using SQL (i.e., no user-defined functions), is it
possible to get the results of a SUM joined with other
tables?
e.g., I want find personal information and TOTAL
DEPOSITS, but deposits are in a different table from name
and address. How would I integrate these two queries to
return DEPOSIT_AMT also?
SELECT CLIENT.PERSON_ID, CLIENT.PERSON_NAME, ADDRESS...
FROM CLIENT, ADDRESS
WHERE CLIENT.PERSON_ID = ADDRESS.PERSON_ID
SELECT ACCOUNT.PERSON_ID, SUM(ACCOUNT.DEPOSIT_AMT)
FROM ACCOUNT
GROUP BY ACCOUNT.PERSON_ID
possible to get the results of a SUM joined with other
tables?
e.g., I want find personal information and TOTAL
DEPOSITS, but deposits are in a different table from name
and address. How would I integrate these two queries to
return DEPOSIT_AMT also?
SELECT CLIENT.PERSON_ID, CLIENT.PERSON_NAME, ADDRESS...
FROM CLIENT, ADDRESS
WHERE CLIENT.PERSON_ID = ADDRESS.PERSON_ID
SELECT ACCOUNT.PERSON_ID, SUM(ACCOUNT.DEPOSIT_AMT)
FROM ACCOUNT
GROUP BY ACCOUNT.PERSON_ID