Original Post
Hey, I have a question, yes on homework, and I can't seem to figure out a little part of the question out. I'm suppose to create a procedure and do this and that within it. However, I was just wondering if there is a simple select statement where I can get for example,
The total number of one certain type of cars for 30,000 dollars.
I was thinking something like
SELECT COUNT(*)
FROM CARS C
WHERE C.NAME = 'LAMBO'
AND ( SELECT SUM( C1.PRICE )
FROM CARS C1
WHERE C1.NAME = 'LAMBO' ) >= 30000;
This is just an example not the actual question. I know this would only return 1 row. So i Guess I'm just unsure how to handle this.
The total number of one certain type of cars for 30,000 dollars.
I was thinking something like
SELECT COUNT(*)
FROM CARS C
WHERE C.NAME = 'LAMBO'
AND ( SELECT SUM( C1.PRICE )
FROM CARS C1
WHERE C1.NAME = 'LAMBO' ) >= 30000;
This is just an example not the actual question. I know this would only return 1 row. So i Guess I'm just unsure how to handle this.