Thanks for the suggestion Greg but this returns an error : "Subquery cannot return more than one result"
Also I only want the location with the maximum occurences
The following simple query executes ok
select location_name, count(*)
from observation
where season (observation_date) = 'summer'
group by location_name;
Season is a function and the query returns the locations and number of occurences of a certain activity
I now want to modify it into a...
I am trying to create a function to return a specific month of the year after passing the function a date argument. I have first created a table as follows:
create table season1 (
season_period CHAR(6) NOT NULL
CHECK (season_period IN ('spring', 'summer', 'autumn', 'winter')),
start_date...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.