Can't understand why this SQL is wrong
There's something fundamental that I'm failing to get here. I have the following SQL query.
SELECT caseid, description, amount, SUM(amount) AS billtotal
WHERE billtran.caseid = 2
The table has dozens and dozens and dozens of rows where the billtran.caseid equals 2, but the query returns only one row. Why? It returns the first row where billtran.caseid equals 2, but what I want is all the rows plus the amount that is the sum of all their values. What do I need to do?