Reputation: 1
I am new to SQL Developer. I have to create a view to approach the sample output list below:
The table structure is:
SITE(Site_ID, Region, Description, Latitude, Longitude, Altitude);
MEASUREMENT(Site_ID, Recorded_On, Name, Value, Outlier_Indicator);
Here is my script, it is working as I followed the advices.
create view Site_Outlier_Incidents AS
select
Site_ID, Name, Outlier_Indicator,
count (SITE.Site_ID) as Number_Of_Incidents
from Site SITE
left join Measurement MEASUREMENT on MEASUREMENT.site_ID = SITE.Site_ID
where Name = 'E.Coli'
group by
Site_ID, Name, Outlier_Indicator;
Upvotes: 0
Views: 174