PS5 1. Log in to your Oracle ApEx account and navigate to the SQL Command window
ID: 3805552 • Letter: P
Question
PS5
1. Log in to your Oracle ApEx account and navigate to the SQL Command window. Use the fl_insurance table from my CSI411W_SQL schema,
So your SELECT statement will look like this:
select * from CIS411w_SQL.fl_insurance
2. Using the fl_insurance table, create a SQL query report that shows the ID, Policy ID, county, construction and line where the line is ‘Commercial’ and the type of construction is either 'Reinforced Concrete' or 'Reinforced Masonry'. ORDER BY county.
Use a column alias to change the column name for count as that the top of the column displays “Florida County”.
Show a screenshot of your SQL query along with a screenshot of the first seven rows of your result set.
3. Keep the prvious SQL query but add the latitude and longitudes. To further refine this query, the insurance company now wants to limit the results returned to just properties that are south of Punta Gorda because a hurricane is expected to make land fall in that area in the next twenty-four hours. Use this link:
http://www.mapsofworld.com/usa/states/florida/lat-long.html
to find the latitudes and longitudes of properties south of Punta Gorda, Florida. Note: longitudes for Florida are stored as negative values in the fl_insurance table. Use the between … and operator to look for a range of latitudes and longitudes.
Don’t forget about Key West.
4. Create a SQL query that lists the ID, Policy ID, county, construction and line for residential properties between Clearwater in the south and (Johnny) Tavares in the north of Florida. These are people deemed lower risk. Use the same technique for latitudes and longitudes given above.
Show a screenshot of your SQL query along with a screenshot of the first seven rows of your result set.
Explanation / Answer
Hey,
1)you have to login through to your local oracle account Ap Ex,which cannot accessed by us.
so please login and execute the below sql query to get the relevant results:
2)SELECT ID, Policy ID, construction,line ,count(county) ” Florida County “ FROM CIS411w_SQL.fl_insurance
WHERE line=‘Commercial’ AND construction IN ('Reinforced Concrete', 'Reinforced Masonry') AND County=’ Florida’
ORDER BY county
Group by ID, Policy ID, construction,line ,county
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.