I have two tables I need to create an average sum from…
Caravan Category M:1 Caravan (caravan has one category, category has many caravans)
Caravan (Caravan_no, rental_amount, annual_rent….
Caravan Category (Caravan_type_id, car_type, pets ….
Caravan Category type has such entities as; American Classic, Conventional, Twin GRP…
I want to create an SQL query that will return a list that show the average cost for a particular caravan type e.g ‘200 ‘Average cost for’ American Classic and so on..
NOTE: car_type has a ‘check in’ constraint of 8 different caravan types so this will stop the user choosing a caravan type that is not listed and messing this up.
USING ORACLE APEX 4.0
Any helpers??
Something like the below ought to do the trick (some field names may need to be changed to match your schema):