MAX Aggregate with AND statement

Hello,
I’m doing the project “CALCULATE AND SUMMARIZE DATA - Trends in Startups”
Trying to combine MAX with AND - and can’t get it running.

What’m I missing here?

SELECT * FROM startups
WHERE raised = (SELECT MAX(raised) FROM startups)
   AND stage IS 'Seed';

Shouldn’t this have something to do with MAX(raised)? Don’t you think it would have been better to have the first WHERE condition here instead?

Do you really need this? Is this the correct way to write an SQL query? Shouldn’t this be what you are selecting?

Is this correct syntax? Have you not already said what table you are querying?

Do you need an IS or would an = be better?

I will post the code hidden. Please try to work it out before you check my code.

Working code; only if needed

select max(raised) from startups where stage = 'Seed';

I hope this helped!

3 Likes

Thanks,
I wanted to see the entire row, so changed the code to this one

SELECT *, MAX(raised) FROM startups
WHERE stage IS 'Seed';

Appreciate the help :slight_smile:

1 Like