Working on some homework. I have a table of 'trips' with 41 entries.
The columns are TRIP_ID, TRIP_NAME, START_LOCATION, STATE, DISTANCE, MAX_GRP_SIZE, TYPE, SEASON
I need to find how many trips originate from each state
I know I can get the overall count with
SELECT COUNT STATE
FROM TRIP
But i can't figure out the syntax for the query to separate the count for each state.
I've been trying something like
SELECT COUNT STATE
FROM TRIP
WHERE STATE IN ('NJ', 'NY', 'NH')
But thats not separating this to counts for each state
Any help would be appreciated.
The columns are TRIP_ID, TRIP_NAME, START_LOCATION, STATE, DISTANCE, MAX_GRP_SIZE, TYPE, SEASON
I need to find how many trips originate from each state
I know I can get the overall count with
SELECT COUNT STATE
FROM TRIP
But i can't figure out the syntax for the query to separate the count for each state.
I've been trying something like
SELECT COUNT STATE
FROM TRIP
WHERE STATE IN ('NJ', 'NY', 'NH')
But thats not separating this to counts for each state
Any help would be appreciated.