You have been tasked to write a set of queries for your management company to display assets, by owner.
Consider the tables below and write a set of Queries to retrieve all of the attributes from the asset and owner tables to show the assets, by owner. You do not have to write join conditions to accomplish this task since simple queries will suffice. Consider which functions you might use in order to sort the data by owner and summarize asset values. Be unique in your response and do not duplicate other responses.
Asset_ID Asset_Name Asset_Type Asset_Value Owner_ID
1 Primary Residence Real Estate $1M 1000
2 Vacation Residence Real Estate $2M 1000
3 Boat Vehicle 500k 2000
4 Vacation Residence Real Estate $10M 1000
Owner_ID Owner_First_Name Owner_Last_Name
1000 Bruce Wayne
2000 Tony Stark
This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.Query 1 : display all assert by owner
SELECT o.OWNER_ID ,o.OWNER_FIRST_NAME, o.OWNER_LAST_NAME,
ast.ASSET_ID, ast.ASSET_NAME, ast.ASSET_TYPE, '$' || ast.ASSET_VALUE || 'k' as "ASSET_VALUE"
FROM ASSET ast,OWNER o
where o.OWNER_ID = ast.OWNER_ID
order by o.OWNER_ID