I have two working queries I can't seem to nest.
First one works:
SELECT * FROM accounts WHERE account = 'some_account';
Second works just fine:
SELECT COUNT(*) FROM accounts;
I would like to join these so that I get the count of accounts from the result of the first query and it would look something like this, but I can't do it.
SELECT COUNT(account) FROM (SELECT * FROM accounts WHERE account = 'some_account');
How would I do this?
COUNT(account)where the middle one hasCOUNT(*), would that make a difference?select count(*) from accounts WHERE account = 'some_account'?