|
-
Need some help with a query
Hello,
I am fairly new to SQL, so any help here would be appreciated
SELECT SUM(ABC - XYZ) AS T1
FROM TBL1
WHERE COND = 'Y'
Now here is what I need to happen -
ABC must be selected based on the condition COND = 'Y'
AND
XYZ must be selected based on the condition COND <> 'Y'
Just to reiterate - I am new to SQL, so if there is any inbuilt feature that already exists that can help me with this problem, please point me in the right direction so I can do some research on it.
Thank you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|