Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Newbie: combining two selects
I am trying to combine the following two SQL statements into
one select statement. The first column in both statements
are the same. It looks like I need a nested statement, but
I don't know how to do that.
SELECT node_data.server, COUNT ( node_data.node_name )
FROM node_data, account
WHERE node_data.node_name = account.node_name
AND acct_number = '7777'
GROUP BY node_data.server
SELECT node_data.server, COUNT ( node_data.node_name )
FROM node_data, account
WHERE node_data.node_name = account.node_name
AND acct_number = '7777'
AND lastacct < 2
GROUP BY node_data.server
Received on Mon Jul 31 2006 - 15:00:56 CDT