Reputation: 198
I want to get the count of the negative numbers saved in a mysql table. Ex: I want to get total numbers of withdrawals and value from the account within last month.
I know that this can be done using extra row. But I want to do this without changing the table structure. I tried with "WHERE Amount < 0" but didn't work. Any help please.
Upvotes: 2
Views: 8035
Reputation: 3386
Something like:
SELECT COUNT(*) FROM Account WHERE Amount<0;
Upvotes: 1